mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-10-18 19:10:36 +08:00
chore: Update to Rust 1.92
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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),
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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(),
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "1.88"
|
||||
channel = "1.92"
|
||||
profile = "default"
|
||||
components = [ "rust-src" ]
|
||||
|
||||
+1
-1
@@ -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),
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user