fix: unreverse size and scale builder functions

This commit is contained in:
Paul Delafosse 2022-05-17 07:11:19 +02:00
parent 5711a84275
commit 73ff98b6d6
2 changed files with 5 additions and 6 deletions

View file

@ -46,7 +46,6 @@ fn linicon() {
"/usr/share/icons/Adwaita/24x24/places/user-home.png",
));
// Fixme
asserting!("Our implementation should return the same result as linicon")
.that(&user_home)
.is_some()
@ -102,5 +101,5 @@ fn linicon() {
asserting!("But we succeed")
.that(&archlinux)
.is_some()
.is_equal_to(PathBuf::from("toto"));
.is_equal_to(PathBuf::from("/usr/share/pixmaps/archlinux-logo.png"));
}

View file

@ -118,8 +118,8 @@ impl<'a> LookupBuilder<'a> {
/// .with_size(48)
/// .find();
/// # }
pub fn with_size(mut self, scale: u16) -> Self {
self.scale = scale;
pub fn with_size(mut self, size: u16) -> Self {
self.size = size;
self
}
@ -134,8 +134,8 @@ impl<'a> LookupBuilder<'a> {
/// .with_scale(2)
/// .find();
/// # }
pub fn with_scale(mut self, size: u16) -> Self {
self.size = size;
pub fn with_scale(mut self, scale: u16) -> Self {
self.scale = scale;
self
}