Skip to content

Commit

Permalink
replace inout with out
Browse files Browse the repository at this point in the history
  • Loading branch information
saviorand committed Jan 16, 2025
1 parent 7833d7a commit ed1624d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lightbug_api/app.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct App[docs_enabled: Bool = False]:
var router: Router
var lightbug_dir: Path

fn __init__(inout self) raises:
fn __init__(out self) raises:
self.router = Router()
self.lightbug_dir = Path()

Expand Down
4 changes: 2 additions & 2 deletions lightbug_api/routing.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct APIRoute(CollectionElement):
struct Router:
var routes: List[APIRoute]

fn __init__(inout self):
fn __init__(out self):
self.routes = List[APIRoute]()

fn __copyinit__(out self: Router, existing: Router):
Expand All @@ -45,5 +45,5 @@ struct Router:
fn __moveinit__(out self: Router, owned existing: Router):
self.routes = existing.routes

fn add_route(inout self, path: String, method: String, handler: fn (HTTPRequest) -> HTTPResponse, operation_id: String):
fn add_route(out self, path: String, method: String, handler: fn (HTTPRequest) -> HTTPResponse, operation_id: String):
self.routes.append(APIRoute(path, method, handler, operation_id))

0 comments on commit ed1624d

Please sign in to comment.