Makes Clippy happy

pull/410/head
Tpt 2 years ago committed by Thomas Tanon
parent 6d4a15d067
commit 1570a3a4f1
  1. 12
      server/src/main.rs

@ -88,7 +88,7 @@ enum Command {
Load { Load {
/// Directory in which the loaded data should be persisted. /// Directory in which the loaded data should be persisted.
#[arg(short, long, global = true)] #[arg(short, long, global = true)]
location: Option<PathBuf>, location: Option<PathBuf>, //TODO: make mandatory on next breaking release
/// file(s) to load. /// file(s) to load.
/// ///
/// If multiple files are provided they are loaded in parallel. /// If multiple files are provided they are loaded in parallel.
@ -147,7 +147,7 @@ pub fn main() -> anyhow::Result<()> {
match matches.command { match matches.command {
Command::Serve { location, bind } => serve( Command::Serve { location, bind } => serve(
if let Some(location) = location { if let Some(location) = location {
Store::open(&location) Store::open(location)
} else { } else {
Store::new() Store::new()
}?, }?,
@ -155,14 +155,14 @@ pub fn main() -> anyhow::Result<()> {
true, true,
), ),
Command::ServeReadOnly { location, bind } => { Command::ServeReadOnly { location, bind } => {
serve(Store::open_read_only(&location)?, bind, false) serve(Store::open_read_only(location)?, bind, false)
} }
Command::ServeSecondary { Command::ServeSecondary {
primary_location, primary_location,
secondary_location, secondary_location,
bind, bind,
} => serve( } => serve(
Store::open_secondary(&primary_location, &secondary_location)?, Store::open_secondary(primary_location, secondary_location)?,
bind, bind,
false, false,
), ),
@ -175,7 +175,7 @@ pub fn main() -> anyhow::Result<()> {
graph, graph,
} => { } => {
let store = if let Some(location) = location { let store = if let Some(location) = location {
Store::open(&location) Store::open(location)
} else { } else {
eprintln!("Warning: opening an in-memory store. It will not be possible to read the written data."); eprintln!("Warning: opening an in-memory store. It will not be possible to read the written data.");
Store::new() Store::new()
@ -307,7 +307,7 @@ pub fn main() -> anyhow::Result<()> {
format, format,
graph, graph,
} => { } => {
let store = Store::open_read_only(&location)?; let store = Store::open_read_only(location)?;
let format = if let Some(format) = format { let format = if let Some(format) = format {
GraphOrDatasetFormat::from_str(&format)? GraphOrDatasetFormat::from_str(&format)?
} else if let Some(file) = &file { } else if let Some(file) = &file {

Loading…
Cancel
Save