Skip to content

Commit

Permalink
ci: run fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
GenericConfluent committed Mar 4, 2024
1 parent fb2bdc3 commit 9f19f0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/course_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl FromStr for CourseId {
.ok_or(anyhow!("Could not find the class id"))?
.parse()?;

if class_id < 100 || 1000 <= class_id {
if !(100..1000).contains(&class_id) {
return Err(anyhow!(
"Class id must be a number, at least 100 and less than 1000"
));
Expand Down Expand Up @@ -255,7 +255,7 @@ mod tests {
use super::*;
use petgraph::visit::EdgeRef;

static CMPUT_SMALL: &'static str = r#"[
static CMPUT_SMALL: &str = r#"[
(
id: (subject_id: "CMPUT", class_id: 101),
name: "",
Expand Down
6 changes: 3 additions & 3 deletions src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ impl Icon {
}
}

impl Into<Text<'static>> for Icon {
fn into(self) -> Text<'static> {
let ch = match self {
impl From<Icon> for Text<'static> {
fn from(val: Icon) -> Self {
let ch = match val {
Icon::AccountTree => "A",
Icon::FullStackedBarChart => "B",
Icon::SideNavigation => "C",
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#![allow(dead_code, unused_variables)]

use std::rc::Rc;
use std::sync::Arc;

use iced::alignment::Horizontal;
use iced::theme::Palette;
use iced::widget::{button, column, container, horizontal_rule, row, text, text_input, Text};
use iced::{executor, font, Application, Color, Command, Element, Length, Padding, Theme};
use iced::{executor, font, Application, Color, Command, Element, Length, Theme};

use iced_aw::native::Split;
use iced_aw::{modal, split, Card, BOOTSTRAP_FONT_BYTES};
use iced_aw::{modal, split, Card};

mod course_database;
use course_database::{CourseDatabase, CourseId};
Expand Down

0 comments on commit 9f19f0e

Please sign in to comment.