Remove unneeded &self param
This commit is contained in:
parent
e3c8bfb1ae
commit
65ecce069e
5 changed files with 8 additions and 8 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -101,7 +101,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-controller"
|
name = "axum-controller"
|
||||||
version = "0.1.1"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"axum-controller-macros",
|
"axum-controller-macros",
|
||||||
|
@ -114,7 +114,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-controller-macros"
|
name = "axum-controller-macros"
|
||||||
version = "0.1.1"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"prettyplease",
|
"prettyplease",
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["axum-controller", "axum-controller-macros"]
|
members = ["axum-controller", "axum-controller-macros"]
|
||||||
resolver = "2"
|
resolver = "3"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
authors = ["Tristan Druyen <ek36g2vcc@mozmail.com>"]
|
authors = ["Tristan Druyen <ek36g2vcc@mozmail.com>"]
|
||||||
categories = ["web-programming"]
|
categories = ["web-programming"]
|
||||||
description = "A controller & route macro for axum"
|
description = "Helper macro's for better readability of axum handlers"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
homepage = "https://git.vlt81.de/vault81/axum-controller"
|
homepage = "https://git.vlt81.de/vault81/axum-controller"
|
||||||
keywords = ["axum", "controller", "macro", "routing"]
|
keywords = ["axum", "controller", "macro", "routing"]
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://git.vlt81.de/vault81/axum-controller"
|
repository = "https://git.vlt81.de/vault81/axum-controller"
|
||||||
version = "0.1.1"
|
version = "0.2.0"
|
||||||
|
|
|
@ -151,7 +151,7 @@ pub fn controller(attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||||
// one where it's #state
|
// one where it's #state
|
||||||
let from_controller_into_router_impl = quote! {
|
let from_controller_into_router_impl = quote! {
|
||||||
impl #struct_name {
|
impl #struct_name {
|
||||||
fn into_router(&self, state: #state) -> axum::Router<#state> {
|
fn into_router(state: #state) -> axum::Router<#state> {
|
||||||
let __nested_router = axum::Router::new()
|
let __nested_router = axum::Router::new()
|
||||||
#(#route_calls)*
|
#(#route_calls)*
|
||||||
#(#middleware_calls)*
|
#(#middleware_calls)*
|
||||||
|
|
|
@ -14,7 +14,7 @@ repository.workspace = true
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum-controller-macros = { path = "../axum-controller-macros", version = "0.1.1" }
|
axum-controller-macros = { path = "../axum-controller-macros", version = "0.2.0" }
|
||||||
axum-typed-routing = { path = "../vendor/axum-typed-routing", version = "0.2.0" }
|
axum-typed-routing = { path = "../vendor/axum-typed-routing", version = "0.2.0" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -39,5 +39,5 @@ impl ExampleController {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _router: axum::Router<AppState>= ExampleController.into_router(AppState());
|
let _router: axum::Router<AppState> = ExampleController::into_router(AppState());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue