Skip to content

Commit

Permalink
lint!
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Aug 19, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7c641da commit d82b7f5
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/feed/mod.rs
Original file line number Diff line number Diff line change
@@ -18,13 +18,13 @@ use feed_rs::model::{Entry as RssEntry, Feed as RssFeed};
use std::slice::Iter;

/// Contains, for a feed source, the list of articles fetched from remote
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Feed {
pub(crate) articles: Vec<Article>,
}

/// identifies a single article in the feed
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Article {
pub title: Option<String>,
pub authors: Vec<String>,
2 changes: 1 addition & 1 deletion src/feed/result.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ use ureq::Error as RequestError;
pub type FeedResult<T> = Result<T, FeedError>;

/// Describes a feed error
#[derive(Debug, Error, PartialEq)]
#[derive(Debug, Error, PartialEq, Eq)]
pub enum FeedError {
#[error("Parse error: {0}")]
Parse(String),
2 changes: 1 addition & 1 deletion src/helpers/fmt.rs
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ mod test {

#[test]
fn should_format_datetime() {
let datetime: DateTime<Local> = SystemTime::from(SystemTime::UNIX_EPOCH)
let datetime: DateTime<Local> = SystemTime::UNIX_EPOCH
.add(Duration::from_secs(36000))
.into();
assert_eq!(format_datetime(datetime, "%Y-%m-%d"), "1970-01-01");
4 changes: 2 additions & 2 deletions src/ui/lib/kiosk.rs
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ pub struct Kiosk {
}

/// Describes the current feed state for a source.
#[derive(Debug, PartialEq)]
#[derive(Debug, Eq, PartialEq)]
pub enum FeedState {
/// Feed loaded with success
Success(Feed),
@@ -26,7 +26,7 @@ pub enum FeedState {
}

/// Describes the current feed state without containing the object
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum FlatFeedState {
/// Feed loaded with success
Success,
2 changes: 1 addition & 1 deletion src/ui/mod.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ pub enum Id {
}

/// Messages produced by components
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum Msg {
ArticleBlur,
ArticleChanged(usize),

0 comments on commit d82b7f5

Please sign in to comment.