Skip to content

Commit a811a68

Browse files
Add Clone, Eq, Ord, Hash derives (#7)
1 parent b86596c commit a811a68

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

src/app_strategy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::path::Path;
55
use std::path::PathBuf;
66

77
/// The arguments to the creator method of an [`AppStrategy`](trait.AppStrategy.html).
8-
#[derive(Debug)]
8+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
99
pub struct AppStrategyArgs {
1010
/// The top level domain of the application, e.g. `com`, `org`, or `io.github`.
1111
pub top_level_domain: String,

src/app_strategy/apple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use std::path::PathBuf;
3939
/// None
4040
/// );
4141
/// ```
42-
#[derive(Debug)]
42+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4343
pub struct Apple {
4444
base_strategy: base_strategy::Apple,
4545
bundle_id: String,

src/app_strategy/unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use std::path::PathBuf;
3737
/// Ok(Path::new(".vim/runtime/")
3838
/// ));
3939
/// ```
40-
#[derive(Debug)]
40+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4141
pub struct Unix {
4242
// This is `.vim` in the above example.
4343
root_dir: PathBuf,

src/app_strategy/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use std::path::PathBuf;
3939
/// None
4040
/// );
4141
/// ```
42-
#[derive(Debug)]
42+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4343
pub struct Windows {
4444
base_strategy: base_strategy::Windows,
4545
author_app_name_path: PathBuf,

src/app_strategy/xdg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ use std::path::PathBuf;
148148
/// None
149149
/// );
150150
/// ```
151-
#[derive(Debug)]
151+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
152152
pub struct Xdg {
153153
base_strategy: base_strategy::Xdg,
154154
unixy_name: String,

src/base_strategy/apple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use std::path::PathBuf;
3232
/// None
3333
/// );
3434
/// ```
35-
#[derive(Debug)]
35+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3636
pub struct Apple {
3737
library_path: PathBuf,
3838
}

src/base_strategy/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use std::path::PathBuf;
3232
/// None
3333
/// );
3434
/// ```
35-
#[derive(Debug)]
35+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3636
pub struct Windows {
3737
appdata: PathBuf,
3838
}

src/base_strategy/xdg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ use std::path::PathBuf;
133133
/// None
134134
/// );
135135
/// ```
136-
#[derive(Debug)]
136+
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
137137
pub struct Xdg {
138138
home_dir: PathBuf,
139139
}

0 commit comments

Comments
 (0)