Skip to content

Commit

Permalink
Merge pull request #139 from mimikun/fix/typo
Browse files Browse the repository at this point in the history
fix: many typos
  • Loading branch information
sachaos authored Aug 23, 2024
2 parents 1871b3b + c6a0049 commit 4782370
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/components/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ use crate::{
config::{Config, KeyBindings, RuntimeConfig},
mode::Mode,
types::ExecutionId,
widget::history_item::HisotryItem,
widget::history_item::HistoryItem,
};

pub struct History {
latest_id: Option<ExecutionId>,
command_tx: Option<UnboundedSender<Action>>,
config: Config,
items: VecDeque<Rc<RefCell<HisotryItem>>>,
index: HashMap<ExecutionId, Rc<RefCell<HisotryItem>>>,
items: VecDeque<Rc<RefCell<HistoryItem>>>,
index: HashMap<ExecutionId, Rc<RefCell<HistoryItem>>>,
state: ListState,
mode: Mode,
runtime_config: RuntimeConfig,
Expand Down Expand Up @@ -68,7 +68,7 @@ impl History {
}

fn insert_history(&mut self, id: ExecutionId, start_time: DateTime<Local>) -> Result<()> {
let item = Rc::new(RefCell::new(HisotryItem::new(
let item = Rc::new(RefCell::new(HistoryItem::new(
id,
start_time,
self.runtime_config.interval,
Expand Down
2 changes: 1 addition & 1 deletion src/components/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
config::{Config, KeyBindings, RuntimeConfig},
mode::Mode,
store::Record,
widget::history_item::HisotryItem,
widget::history_item::HistoryItem,
};

pub struct Home {
Expand Down
2 changes: 1 addition & 1 deletion src/store/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::sync::{Arc, Mutex};

use crate::store::{Record, Store};
use crate::types::ExecutionId;
use crate::widget::history_item::HisotryItem;
use crate::widget::history_item::HistoryItem;

#[derive(Debug, Clone)]
pub struct SQLiteStore {
Expand Down
8 changes: 4 additions & 4 deletions src/widget/history_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tui_widget_list::{List, ListState, PreRender, PreRenderContext};
use crate::{config::Config, types::ExecutionId};

#[derive(Debug, Clone)]
pub struct HisotryItem {
pub struct HistoryItem {
pub id: ExecutionId,
pub diff: Option<(u32, u32)>,
pub start_time: DateTime<Local>,
Expand All @@ -18,7 +18,7 @@ pub struct HisotryItem {
pub secondary_text_style: Style,
}

impl HisotryItem {
impl HistoryItem {
pub fn new(
id: ExecutionId,
start_time: DateTime<Local>,
Expand Down Expand Up @@ -51,7 +51,7 @@ impl HisotryItem {
}
}

impl PreRender for HisotryItem {
impl PreRender for HistoryItem {
fn pre_render(&mut self, context: &PreRenderContext) -> u16 {
if context.is_selected {
self.style = self.selector_style;
Expand All @@ -61,7 +61,7 @@ impl PreRender for HisotryItem {
}
}

impl Widget for HisotryItem {
impl Widget for HistoryItem {
fn render(self, area: Rect, buf: &mut Buffer) {
let time_style = if self.is_running {
self.secondary_text_style
Expand Down

0 comments on commit 4782370

Please sign in to comment.