Skip to content

Commit

Permalink
listen to the lord and saviour clippy (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
Milo123459 authored Aug 5, 2024
1 parent cc1af59 commit 1372814
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
7 changes: 1 addition & 6 deletions src/commands/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ pub async fn command(args: Args, _json: bool) -> Result<()> {
.iter()
.map(|v| {
let mut split = v.split('=');
let key = split
.next()
.as_deref()
.unwrap_or_default()
.trim()
.to_owned();
let key = split.next().unwrap_or_default().trim().to_owned();
let value = split.collect::<Vec<&str>>().join("=").trim().to_owned();
(key, value)
})
Expand Down
7 changes: 1 addition & 6 deletions src/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ pub async fn command(args: Args, _json: bool) -> Result<()> {
.iter()
.map(|v| {
let mut split = v.split('=');
let key = split
.next()
.as_deref()
.unwrap_or_default()
.trim()
.to_owned();
let key = split.next().unwrap_or_default().trim().to_owned();
let value = split.collect::<Vec<&str>>().join("=").trim().to_owned();
(key, value)
})
Expand Down
4 changes: 2 additions & 2 deletions src/commands/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ fn print_existing_domains(domains: &DomainsDomains) -> Result<()> {
if domain_count == 1 {
let domain = domains
.service_domains
.get(0)
.first()
.map(|d| d.domain.clone())
.unwrap_or_else(|| {
domains
.custom_domains
.get(0)
.first()
.map(|d| d.domain.clone())
.unwrap_or_else(|| unreachable!())
});
Expand Down

0 comments on commit 1372814

Please sign in to comment.