Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Jun 29, 2024
1 parent 40da72a commit 9960a0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions martin/src/srv/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ pub fn new_server(
state: ServerState,
) -> MartinResult<(Server, String)> {
let catalog = Catalog::new(&state)?;

let keep_alive = Duration::from_secs(config.keep_alive.unwrap_or(KEEP_ALIVE_DEFAULT));
let worker_processes = config.worker_processes.unwrap_or_else(num_cpus::get);
let listen_addresses = config
Expand Down
18 changes: 10 additions & 8 deletions martin/src/srv/tiles_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ async fn get_source_info(
};

// Construct a tiles URL from the request info, including the query string if present.
let info = req.connection_info();
let tiles_url = Uri::builder()
.scheme(info.scheme())
.authority(info.host())
.path_and_query(path_and_query)
.build()
.map(|tiles_url| tiles_url.to_string())
.map_err(|e| ErrorBadRequest(format!("Can't build tiles URL: {e}")))?;
let tiles_url = {
let info = req.connection_info();
Uri::builder()
.scheme(info.scheme())
.authority(info.host())
.path_and_query(path_and_query)
.build()
.map(|tiles_url| tiles_url.to_string())
.map_err(|e| ErrorBadRequest(format!("Can't build tiles URL: {e}")))?
};

let sources = sources.read().await;
let sources = sources.get_sources(&path.source_ids, None)?.0;
Expand Down

0 comments on commit 9960a0e

Please sign in to comment.