Commit graph

14 commits

Author SHA1 Message Date
Kai Jewson
2b6dba49cb
Remove the associated Body type on IntoResponse (#571) 2021-11-28 18:52:18 +01:00
David Pedersen
6d0abd447c
axum-debug: Version 0.2.2 (#553)
- Fix regression causing errors when `#[debug_handler]` was used on functions with multiple
  extractors ([#552])

[#552]: https://github.com/tokio-rs/axum/pull/552
2021-11-22 09:40:35 +00:00
David Pedersen
27e848fbe8
Fix #[debug_handler] for multiple extractors (#552)
* Fix `#[debug_handler]` for multiple extractors

It generated a function for each extractor to check the type but those
functions didn't have unique names.

Fixed by including all idents in the `arg: Extractor` token tree in the
name of the function generated. Not sure there is a simpler way to fix
it.

* just use a counter

* don't need visit feature anymore
2021-11-22 10:28:43 +01:00
Jonas Platte
69fee5864d
Use .to_owned() instead of .to_string() to turn &str into String (#548) 2021-11-19 22:15:47 +00:00
David Pedersen
44a49cb199
axum-debug: Version 0.2.1 (#545)
- Make macro handle more cases such as mutable extractors and handlers taking
  `self` ([#518])

[#518]: https://github.com/tokio-rs/axum/pull/518
2021-11-19 20:38:30 +00:00
David Pedersen
f1f004a057
Make axum-debug handle more cases (#518)
* Make `axum-debug` handle more cases

* Only just trybuild tests on stable

* revert changes to hello-world example

* Remove a bit of duplication

* return error on generics

* address review feedback

* Support associated functions with receiver or returns `Self`

* fix indentation
2021-11-19 21:32:07 +01:00
David Pedersen
a16ea65031
Add axum-extra crate (#536)
* Add `axum-extra` crate

Empty for now but now we have a place to put stuff.

I'll make a PR for moving over https://github.com/davidpdrsn/axum-resource.

* remove `authors` field from `Cargo.toml`s
2021-11-17 20:00:32 +00:00
david-perez
3cf8ee3b5e
Drop Sync requirement on the handler function (#522)
Since it doesn't need to be called from different threads at the same
time.
2021-11-16 15:00:56 +01:00
David Pedersen
e58336621d
axum-debug: Version 0.2.0 (#511)
- **breaking:** Removed `debug_router` macro.
- **breaking:** Removed `check_service` function.
- **breaking:** Removed `debug_service` function.
2021-11-13 20:44:13 +01:00
Jonas Platte
89db85d202
axum-debug: Move axum dependency to dev-dependencies (#506) 2021-11-13 17:38:09 +01:00
David Pedersen
c7b8813c47
Add trybuild tests for axum-debug (#501)
The things are also covered by the doc tests but this also gives us
assertions on the errors produced, which is the whole point of this
crate :)
2021-11-11 20:26:08 +00:00
David Pedersen
fb8156f17c
axum-debug readme fixes (#499)
* Fix build status badge in axum-debug

* fix links

* fix one more link
2021-11-11 16:53:07 +00:00
David Pedersen
5da3f34b3e
Clean up axum-debug crate (#498)
* Clean up axum-debug crate

Mostly just brings the crate more in line with the rest of the crates in
the workspace.

I've also removed the axum-debug-macros crate since axum-debug only
contained one re-export from axum-debug-macros. So we didn't need two
crates. Can always bring the "backend" crate back if we need things in
axum-debug that aren't proc-macros.

* Just testing: This should make CI fail

* Misc CI clean up

* fix intentional breakage

* fix changelog

* Remove rustfmt config for now as it gives warnings on stable

* Fix paths
2021-11-11 17:33:33 +01:00
Eray Karatay
f6b47478da
Move axum-debug crate to workspace (#497)
* add axum-debug to workspace

* update readme

* add changes to changelog

* little docs update

* fix the gap

a tab has leaked into workspace Cargo.toml, it must be fixed

* address clippy warnings
2021-11-11 15:18:40 +01:00