commit 003d473b5add6eec197e1ff3ba14ed004004251d
parent 22c66742b578ec4050c2ea717a03090d215b2e21
Author: William Casarin <jb55@jb55.com>
Date: Thu, 28 Nov 2024 15:12:53 -0800
config: return mut Self for builder
This is a bit more idiomatic
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/config.rs b/src/config.rs
@@ -30,12 +30,12 @@ impl Config {
}
//
- pub fn set_flags(&mut self, flags: i32) -> &mut Self {
+ pub fn set_flags(mut self, flags: i32) -> Self {
self.config.flags = flags;
self
}
- pub fn skip_validation(&mut self, skip: bool) -> &mut Self {
+ pub fn skip_validation(mut self, skip: bool) -> Self {
let skip_note_verify: i32 = 1 << 1;
if skip {
@@ -47,12 +47,12 @@ impl Config {
self
}
- pub fn set_mapsize(&mut self, bytes: usize) -> &mut Self {
+ pub fn set_mapsize(mut self, bytes: usize) -> Self {
self.config.mapsize = bytes;
self
}
- pub fn set_ingester_threads(&mut self, threads: i32) -> &mut Self {
+ pub fn set_ingester_threads(mut self, threads: i32) -> Self {
self.config.ingester_threads = threads;
self
}