diff options
author | Daniel Eades <danieleades@hotmail.com> | 2022-01-29 12:14:37 +0100 |
---|---|---|
committer | Daniel Eades <danieleades@hotmail.com> | 2022-01-29 14:01:49 +0100 |
commit | 6ecfeec624ae9e145b66431188bae31c17bcd154 (patch) | |
tree | 82a552f664dd98c5e55007aff914632834810e33 /tests | |
parent | 53e43fbcf96b5c2a661d052a6e3d55fc3709f1e1 (diff) |
use 'Self' to refer to own type
Diffstat (limited to 'tests')
-rw-r--r-- | tests/async_builder.rs | 2 | ||||
-rw-r--r-- | tests/defaults.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/async_builder.rs b/tests/async_builder.rs index 51be9ca..bead9d3 100644 --- a/tests/async_builder.rs +++ b/tests/async_builder.rs @@ -12,7 +12,7 @@ struct AsyncFile { /// This is a test only implementation to be used in tests impl AsyncFile { pub fn new(path: String, format: FileFormat) -> Self { - AsyncFile { path, format } + Self { path, format } } } diff --git a/tests/defaults.rs b/tests/defaults.rs index 4539097..f740259 100644 --- a/tests/defaults.rs +++ b/tests/defaults.rs @@ -10,7 +10,7 @@ pub struct Settings { impl Default for Settings { fn default() -> Self { - Settings { + Self { db_host: String::from("default"), } } |