File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ pub struct QueryId(String);
53
53
54
54
impl QueryId {
55
55
/// 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 {
57
57
Self ( s)
58
58
}
59
59
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ impl Query {
166
166
// If this enum changes in future we'll probably want to early return
167
167
// hence using `match` instead of `if let`.
168
168
match self {
169
- Query :: Tail ( target) => Ok ( target) ,
169
+ Self :: Tail ( target) => Ok ( target) ,
170
170
// This could change in future; don't want a catch-all
171
171
// pattern though as we should handle it properly.
172
172
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ fn go_target() -> Result<String, Box<dyn Error>> {
30
30
31
31
fn watch ( mut args : impl Iterator < Item = String > ) -> Result < ( ) , Box < dyn Error > > {
32
32
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" ) {
34
34
( "build --release" , "release" )
35
35
} else {
36
36
( "build" , "debug" )
You can’t perform that action at this time.
0 commit comments