Skip to content

Commit 3e35b0c

Browse files
Fix lints
1 parent 9503083 commit 3e35b0c

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/db/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl CustomizeConnection<Connection, ::rusqlite::Error> for ConnectionCustomizer
3030
pub struct Database {
3131
pool: Pool<SqliteConnectionManager>,
3232
// The tempfile is stored here to drop it after all the connections are closed
33-
tempfile: Option<Arc<NamedTempFile>>,
33+
_tempfile: Option<Arc<NamedTempFile>>,
3434
}
3535

3636
impl Database {
@@ -76,7 +76,7 @@ impl Database {
7676

7777
Ok(Database {
7878
pool,
79-
tempfile: tempfile.map(Arc::new),
79+
_tempfile: tempfile.map(Arc::new),
8080
})
8181
}
8282

src/runner/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ fn failure_reason(err: &Error) -> FailureReason {
1717
for cause in err.iter_chain() {
1818
if let Some(&CommandError::SandboxOOM) = cause.downcast_ctx() {
1919
return FailureReason::OOM;
20-
} else if let Some(&CommandError::NoOutputFor(_)) = cause.downcast_ctx() {
21-
return FailureReason::Timeout;
22-
} else if let Some(&CommandError::Timeout(_)) = cause.downcast_ctx() {
20+
} else if let Some(&CommandError::NoOutputFor(_) | &CommandError::Timeout(_)) =
21+
cause.downcast_ctx()
22+
{
2323
return FailureReason::Timeout;
2424
} else if let Some(reason) = cause.downcast_ctx::<FailureReason>() {
2525
return reason.clone();

src/server/routes/agent.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ fn handle_results(resp: Fallible<Response<Body>>) -> Response<Body> {
244244
fn handle_errors(err: Rejection) -> Result<Response<Body>, Rejection> {
245245
let error = if let Some(compat) = err.find_cause::<Compat<HttpError>>() {
246246
Some(*compat.get_ref())
247-
} else if let StatusCode::NOT_FOUND = err.status() {
248-
Some(HttpError::NotFound)
249-
} else if let StatusCode::METHOD_NOT_ALLOWED = err.status() {
247+
} else if let StatusCode::NOT_FOUND | StatusCode::METHOD_NOT_ALLOWED = err.status() {
250248
Some(HttpError::NotFound)
251249
} else {
252250
None

0 commit comments

Comments
 (0)