Skip to content

Commit

Permalink
Cargo clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCAB0 committed Jul 8, 2023
1 parent 1808006 commit edfaf53
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/model/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub enum ArticleStatus {
}

impl From<&ArticleStatus> for &str {
/// From `&ArticleStatus` to `&str`
/// From `&ArticleStatus` to `&str`
fn from(status: &ArticleStatus) -> Self {
match *status {
ArticleStatus::NewTags => "6",
Expand All @@ -59,7 +59,7 @@ pub enum SortBy {
}

impl From<&SortBy> for &str {
/// From `&SortBy` to `&str`
/// From `&SortBy` to `&str`
fn from(sort: &SortBy) -> Self {
match *sort {
SortBy::Relevance => "relevance",
Expand Down
2 changes: 1 addition & 1 deletion src/model/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Item {
pub brand_title: String,
pub currency: String,
pub price: String,
pub photo: Photo,
pub photo: Photo,
pub url: String,
pub is_visible: i32,
pub promoted: bool,
Expand Down
4 changes: 2 additions & 2 deletions src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl<'a> VintedWrapper<'a> {
}
}

pub fn get_host(&self) -> &str{
pub fn get_host(&self) -> &str {
self.host
}

Expand Down Expand Up @@ -272,7 +272,7 @@ impl<'a> VintedWrapper<'a> {
}

if let Some(vec) = &filters.article_status {
let querify_vec: Vec<&str> = vec.into_iter().map(|status| status.into()).collect();
let querify_vec: Vec<&str> = vec.iter().map(|status| status.into()).collect();

let mut article_status_args: String = format!("&status_ids={}", querify_vec.join(","));

Expand Down

0 comments on commit edfaf53

Please sign in to comment.