Skip to content

Commit

Permalink
Update to rust 1.80 (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchengxu authored Aug 11, 2024
1 parent 7a25ebd commit 3e8d001
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/filter/src/sequential_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ mod tests {

item
})
.take(usize::max_value() >> 8),
.take(usize::MAX >> 8),
),
)
.unwrap()
Expand Down
15 changes: 9 additions & 6 deletions crates/maple_config/doc_gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,15 @@ impl FieldInfo {
}

fn extract_doc_comment(attr: &Attribute) -> Option<String> {
if let Ok(MetaNameValue { path, value, .. }) = attr.meta.require_name_value() {
if let Expr::Lit(expr_lit) = value {
if let Lit::Str(comment) = &expr_lit.lit {
if path.is_ident("doc") {
return Some(comment.value());
}
if let Ok(MetaNameValue {
path,
value: Expr::Lit(expr_lit),
..
}) = attr.meta.require_name_value()
{
if let Lit::Str(comment) = &expr_lit.lit {
if path.is_ident("doc") {
return Some(comment.value());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/maple_config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ pub struct SyntaxPluginConfig {
/// Possible values:
/// - `visual-lines`: Always render the visual lines only.
/// - `entire-buffer-up-to-limit`: Render the entire buffer until
/// the buffer size exceeds the size limit (in bytes).
/// the buffer size exceeds the size limit (in bytes).
///
/// # Example
///
Expand Down
2 changes: 2 additions & 0 deletions crates/maple_core/src/stdio_server/plugin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ pub trait ClapPlugin: ClapAction + Debug + Send + Sync + 'static {
mod tests {
#[derive(maple_derive::ClapPlugin)]
#[clap_plugin(id = "plugin", actions = ["action1", "action2"])]
#[allow(dead_code)]
struct TestPlugin;

#[derive(maple_derive::ClapPlugin)]
#[clap_plugin(id = "empty")]
#[allow(dead_code)]
struct EmptyPlugin;

#[test]
Expand Down
1 change: 1 addition & 0 deletions crates/maple_derive/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(dead_code)]
use types::AutocmdEventType;

#[async_trait::async_trait]
Expand Down
2 changes: 1 addition & 1 deletion crates/printer/src/trimmer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! 1. `let g:clap_force_python = 1`.
//! 2. open https://github.com/subspace/subspace/blob/c50bec907ab8ade923a2a0b4888f43bfc47e8a7f/polkadot/node/collation-generation/src/lib.rs
//! 3. Type `sr` and then you'll see Neovim hang forever, have no idea&time to fix it
//! properly therefore the old implementation are just kept.
//! properly therefore the old implementation are just kept.

use super::AsciiDots;

Expand Down
2 changes: 1 addition & 1 deletion crates/printer/src/truncation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ mod tests {
fn test_grep_print() {
// GrepResult { matched_item: MatchedItem { item: "crates/maple_core/src/paths.rs:198:31:let expected = \"~/.rustup/.../src/rust/library/alloc/src/string.rs\";", rank: [874, -30, -68, 0], indices: [68, 69, 77, 91, 92], display_text: None, output_text: None }, path: "/home/xlc/.vim/plugged/vim-clap/crates/maple_core/src/paths.rs", line_number: 198, line_number_start: 32, line_number_end: 35, column: 31, column_start: 36, column_end: 38 }, winwidth: 62, icon: Enabled(Grep)
let line = r#"crates/maple_core/src/paths.rs:198:31:let expected = "~/.rustup/.../src/rust/library/alloc/src/string.rs";"#;
let mut items = vec![GrepResult {
let mut items = [GrepResult {
matched_item: MatchedItem::new(
Arc::new(line.to_string()) as Arc<dyn ClapItem>,
[874, -30, -68, 0],
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.77"
channel = "1.80"

0 comments on commit 3e8d001

Please sign in to comment.