Skip to content

Commit 484aba3

Browse files
Showfomclaude
andcommitted
style: fix formatting with cargo fmt
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6a6fd7d commit 484aba3

9 files changed

Lines changed: 18 additions & 9 deletions

File tree

src/cache.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ pub struct Cache {
1414
impl Cache {
1515
/// Create a new cache (~/.cache/rdap/ on all platforms)
1616
pub fn new() -> Result<Self> {
17-
let cache_dir = std::env::var("HOME").map_or_else(|_| PathBuf::from(".cache/rdap"), |h| PathBuf::from(h).join(".cache/rdap"));
17+
let cache_dir = std::env::var("HOME").map_or_else(
18+
|_| PathBuf::from(".cache/rdap"),
19+
|h| PathBuf::from(h).join(".cache/rdap"),
20+
);
1821

1922
fs::create_dir_all(&cache_dir)?;
2023

src/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ impl Default for CacheConfig {
7878

7979
/// Get the user config directory path (~/.config/rdap/)
8080
pub fn user_config_dir() -> Result<PathBuf> {
81-
let dir = std::env::var("HOME").map_or_else(|_| PathBuf::from(".config/rdap"), |h| PathBuf::from(h).join(".config/rdap"));
81+
let dir = std::env::var("HOME").map_or_else(
82+
|_| PathBuf::from(".config/rdap"),
83+
|h| PathBuf::from(h).join(".config/rdap"),
84+
);
8285
Ok(dir)
8386
}
8487

src/display.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
//! Beautiful colored output for RDAP objects
22
3-
use crate::models::{RdapObject, Entity, IpNetwork, Autnum, Domain, Nameserver, ErrorResponse, DomainSearchResults, EntitySearchResults, NameserverSearchResults, HelpResponse, Notice};
3+
use crate::models::{
4+
Autnum, Domain, DomainSearchResults, Entity, EntitySearchResults, ErrorResponse, HelpResponse,
5+
IpNetwork, Nameserver, NameserverSearchResults, Notice, RdapObject,
6+
};
47
use colored::Colorize;
58
use std::collections::HashMap;
69

src/models/autnum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Autonomous System Number model
22
3-
use super::{Notice, Status, Entity, Remark, Link, Event};
3+
use super::{Entity, Event, Link, Notice, Remark, Status};
44
use serde::{Deserialize, Serialize};
55

66
/// Autonomous System Number information

src/models/domain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Domain object model
22
3-
use super::{Notice, Nameserver, Entity, Status, PublicId, Remark, Link, Event, IpNetwork};
3+
use super::{Entity, Event, IpNetwork, Link, Nameserver, Notice, PublicId, Remark, Status};
44
use serde::{Deserialize, Serialize};
55

66
/// Domain name registration information

src/models/entity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Entity (person/organization) model
22
3-
use super::{Notice, VCard, PublicId, Remark, Link, Event, Status, IpNetwork, Autnum};
3+
use super::{Autnum, Event, IpNetwork, Link, Notice, PublicId, Remark, Status, VCard};
44
use serde::{Deserialize, Serialize};
55

66
/// Entity representing a person or organization

src/models/ip_network.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! IP Network model
22
3-
use super::{Notice, Status, Entity, Remark, Link, Event};
3+
use super::{Entity, Event, Link, Notice, Remark, Status};
44
use serde::{Deserialize, Serialize};
55

66
/// IP Network information

src/models/nameserver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Nameserver model
22
3-
use super::{Notice, Entity, Status, Remark, Link, Event};
3+
use super::{Entity, Event, Link, Notice, Remark, Status};
44
use serde::{Deserialize, Serialize};
55

66
/// Nameserver information

src/models/search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Search result models
22
3-
use super::{Notice, Domain, Entity, Nameserver};
3+
use super::{Domain, Entity, Nameserver, Notice};
44
use serde::{Deserialize, Serialize};
55

66
/// Domain search results

0 commit comments

Comments
 (0)