Skip to content

Commit b58d8e3

Browse files
committed
Fix another clippy issue
1 parent c899a6a commit b58d8e3

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

graphannis/src/annis/db/aql/model.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ pub struct AQLUpdateGraphIndex {
167167
}
168168

169169
impl AQLUpdateGraphIndex {
170+
#[allow(
171+
clippy::owned_cow,
172+
reason = "We don't want to copy the node_name if not necessary and also have to look up &String"
173+
)]
170174
fn get_cached_node_id_from_name(
171175
&mut self,
172176
node_name: Cow<String>,

webservice/src/main.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use simplelog::{
3333
};
3434
use std::fs::OpenOptions;
3535
use std::{
36-
io::{Error, ErrorKind, Result},
36+
io::{Error, Result},
3737
path::PathBuf,
3838
};
3939

@@ -270,12 +270,8 @@ async fn get_api_html_docs(_req: HttpRequest) -> HttpResponse {
270270
#[actix_web::main]
271271
async fn main() -> Result<()> {
272272
// Initialize application and its state
273-
let (cs, settings, db_pool) = init_app_state().map_err(|e| {
274-
Error::new(
275-
ErrorKind::Other,
276-
format!("Could not initialize graphANNIS service: {:?}", e),
277-
)
278-
})?;
273+
let (cs, settings, db_pool) = init_app_state()
274+
.map_err(|e| Error::other(format!("Could not initialize graphANNIS service: {:?}", e)))?;
279275

280276
let bind_address = format!("{}:{}", &settings.bind.host, &settings.bind.port);
281277
let cs = web::Data::new(cs);

0 commit comments

Comments
 (0)