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]]
|
||||
name = "axum-controller"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-controller-macros",
|
||||
|
@ -114,7 +114,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "axum-controller-macros"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"prettyplease",
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
[workspace]
|
||||
members = ["axum-controller", "axum-controller-macros"]
|
||||
resolver = "2"
|
||||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
authors = ["Tristan Druyen <ek36g2vcc@mozmail.com>"]
|
||||
categories = ["web-programming"]
|
||||
description = "A controller & route macro for axum"
|
||||
description = "Helper macro's for better readability of axum handlers"
|
||||
edition = "2024"
|
||||
homepage = "https://git.vlt81.de/vault81/axum-controller"
|
||||
keywords = ["axum", "controller", "macro", "routing"]
|
||||
license = "AGPL-3.0-or-later"
|
||||
readme = "README.md"
|
||||
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
|
||||
let from_controller_into_router_impl = quote! {
|
||||
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()
|
||||
#(#route_calls)*
|
||||
#(#middleware_calls)*
|
||||
|
|
|
@ -14,7 +14,7 @@ repository.workspace = true
|
|||
version.workspace = true
|
||||
|
||||
[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" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -39,5 +39,5 @@ impl ExampleController {
|
|||
}
|
||||
|
||||
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