Skip to content

Commit 2df7746

Browse files
committed
applease clippy
1 parent aaa7f11 commit 2df7746

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/cli.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,10 @@ impl Crater {
600600
}
601601
Crater::Server { bind } => {
602602
let config = Config::load()?;
603-
server::run(config, bind.unwrap_or(([127, 0, 0, 1], 8000).into()))?;
603+
server::run(
604+
config,
605+
bind.unwrap_or_else(|| ([127, 0, 0, 1], 8000).into()),
606+
)?;
604607
}
605608
Crater::Agent {
606609
ref url,

src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ impl Config {
242242
}
243243

244244
#[cfg(test)]
245+
#[allow(clippy::trivial_regex)]
245246
impl Default for Config {
246247
fn default() -> Self {
247248
Config {

src/report/s3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn get_client_for_bucket(bucket: &str) -> Fallible<Box<dyn S3>> {
7676
.sync()
7777
.context(S3Error::UnknownBucketRegion)?;
7878
let region = match response.location_constraint.as_ref() {
79-
Some(region) if region == "" => Region::UsEast1,
79+
Some(region) if region.is_empty() => Region::UsEast1,
8080
Some(region) => Region::from_str(region).context(S3Error::UnknownBucketRegion)?,
8181
None => return Err(S3Error::UnknownBucketRegion.into()),
8282
};

src/server/routes/webhooks/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn process_command(
8383
}
8484

8585
let command = line[line.find(' ').unwrap()..].trim();
86-
if command == "" {
86+
if command.is_empty() {
8787
continue;
8888
}
8989

0 commit comments

Comments
 (0)