Radish alpha
r
rad:z39mP9rQAaGmERfUMPULfPUi473tY
Radicle terminal user interface
Radicle
Git
chore: Update to Rust 1.92
Merged did:key:z6MkgFq6...nBGz opened 4 months ago
8 files changed +11 -10 e2242112 fc38ebce
modified bin/commands/patch/review.rs
@@ -44,6 +44,7 @@ pub enum ReviewAction {
    Comment,
}

+
#[allow(dead_code)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Args(String);

@@ -704,7 +705,7 @@ mod test {
    use crate::test;

    impl App<'_> {
-
        pub fn hunks(&self) -> Vec<StatefulHunkItem> {
+
        pub fn hunks(&self) -> Vec<StatefulHunkItem<'_>> {
            self.hunks.lock().unwrap().clone()
        }
    }
modified bin/git.rs
@@ -295,7 +295,7 @@ impl HunkDiff {
        }
    }

-
    pub fn paths(&self) -> FilePaths {
+
    pub fn paths(&self) -> FilePaths<'_> {
        match self {
            Self::Added { path, new, .. } => (None, Some((path, new.oid))),
            Self::Deleted { path, old, .. } => (Some((path, old.oid)), None),
modified bin/ui/items.rs
@@ -231,7 +231,7 @@ impl IssueItem {
}

impl ToRow<8> for IssueItem {
-
    fn to_row(&self) -> [Cell; 8] {
+
    fn to_row(&self) -> [Cell<'_>; 8] {
        let (state, state_color) = format::issue_state(&self.state);

        let state = span::default(&state).style(Style::default().fg(state_color));
@@ -489,7 +489,7 @@ impl PatchItem {
}

impl ToRow<9> for PatchItem {
-
    fn to_row(&self) -> [Cell; 9] {
+
    fn to_row(&self) -> [Cell<'_>; 9] {
        let (state, color) = format::patch_state(&self.state);

        let state = span::default(&state).style(Style::default().fg(color));
@@ -1024,7 +1024,7 @@ impl From<(&Repository, &Review, &HunkDiff)> for HunkItem<'_> {
}

impl ToRow<3> for StatefulHunkItem<'_> {
-
    fn to_row(&self) -> [Cell; 3] {
+
    fn to_row(&self) -> [Cell<'_>; 3] {
        let build_stats_spans = |stats: &DiffStats| -> Vec<Span<'_>> {
            let mut cell = vec![];
            let comments = &self.inner().comments;
modified bin/ui/items/notification.rs
@@ -254,7 +254,7 @@ impl Notification {
}

impl ToRow<9> for Notification {
-
    fn to_row(&self) -> [Cell; 9] {
+
    fn to_row(&self) -> [Cell<'_>; 9] {
        let (type_name, summary, status, kind_id) = match &self.kind {
            NotificationKind::Branch {
                name,
modified examples/selection.rs
@@ -31,7 +31,7 @@ struct Item {
}

impl ToRow<3> for Item {
-
    fn to_row(&self) -> [Cell; 3] {
+
    fn to_row(&self) -> [Cell<'_>; 3] {
        [
            Span::raw(self.id.to_string()).magenta().dim().into(),
            Span::raw(self.title.clone()).into(),
modified rust-toolchain.toml
@@ -1,4 +1,4 @@
[toolchain]
-
channel = "1.88"
+
channel = "1.92"
profile = "default"
components = [ "rust-src" ]
modified src/terminal.rs
@@ -53,7 +53,7 @@ impl Terminal {
        Ok(())
    }

-
    pub fn draw<F>(&mut self, f: F) -> io::Result<CompletedFrame>
+
    pub fn draw<F>(&mut self, f: F) -> io::Result<CompletedFrame<'_>>
    where
        F: FnOnce(&mut Frame),
    {
modified src/ui.rs
@@ -112,7 +112,7 @@ impl From<Spacing> for u16 {

/// Needs to be implemented for items that are supposed to be rendered in tables.
pub trait ToRow<const W: usize> {
-
    fn to_row(&self) -> [Cell; W];
+
    fn to_row(&self) -> [Cell<'_>; W];
}

/// Needs to be implemented for items that are supposed to be rendered in trees.