Skip to content

Commit

Permalink
chore: fix clippy warning
Browse files Browse the repository at this point in the history
Remove unnecessary TryInto conversion for an infallible one.
  • Loading branch information
ereslibre committed Jan 24, 2024
1 parent 991c315 commit e32a258
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ pub async fn serve(serve_options: ServeOptions) -> Result<Server> {

let server = HttpServer::new(move || {
// Initializes the app data for handlers
let app_data: Data<AppData> = Data::new(
<ServeOptions as TryInto<AppData>>::try_into(serve_options.clone())
.expect("failed initializing server"),
);
let app_data: Data<AppData> = Data::new(serve_options.clone().into());

let mut app = App::new()
// enable logger
Expand Down

0 comments on commit e32a258

Please sign in to comment.