Skip to content

Commit df1f266

Browse files
committed
Appease nursery clippy
1 parent 6a8e2a6 commit df1f266

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

backend/src/path.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub struct QueryId(String);
5353

5454
impl QueryId {
5555
/// Create a `QueryId` from a string containing a pre-computed hash.
56-
pub fn new(s: String) -> QueryId {
56+
pub const fn new(s: String) -> Self {
5757
Self(s)
5858
}
5959

backend/src/queries.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl Query {
166166
// If this enum changes in future we'll probably want to early return
167167
// hence using `match` instead of `if let`.
168168
match self {
169-
Query::Tail(target) => Ok(target),
169+
Self::Tail(target) => Ok(target),
170170
// This could change in future; don't want a catch-all
171171
// pattern though as we should handle it properly.
172172
}

xtask/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn go_target() -> Result<String, Box<dyn Error>> {
3030

3131
fn watch(mut args: impl Iterator<Item = String>) -> Result<(), Box<dyn Error>> {
3232
let go_target = go_target()?;
33-
let (build_cmd, cargo_target) = if let Some("release") = args.next().as_deref() {
33+
let (build_cmd, cargo_target) = if args.next().as_deref() == Some("release") {
3434
("build --release", "release")
3535
} else {
3636
("build", "debug")

0 commit comments

Comments
 (0)