mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:06:40 +02:00
Rust 1.85, edition=2024 (#15741)
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
authors = ["The Nushell Project Developers"]
|
||||
description = "A version incrementer plugin for Nushell"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_example"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_example"
|
||||
version = "0.104.1"
|
||||
@ -20,4 +20,4 @@ nu-protocol = { path = "../nu-protocol", version = "0.104.1", features = ["plugi
|
||||
|
||||
[dev-dependencies]
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.104.1" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.104.1" }
|
||||
|
@ -72,10 +72,10 @@ enum IntOrFloat {
|
||||
impl IntOrFloat {
|
||||
pub(crate) fn add_i64(&mut self, n: i64) {
|
||||
match self {
|
||||
IntOrFloat::Int(ref mut v) => {
|
||||
IntOrFloat::Int(v) => {
|
||||
*v += n;
|
||||
}
|
||||
IntOrFloat::Float(ref mut v) => {
|
||||
IntOrFloat::Float(v) => {
|
||||
*v += n as f64;
|
||||
}
|
||||
}
|
||||
@ -86,7 +86,7 @@ impl IntOrFloat {
|
||||
IntOrFloat::Int(v) => {
|
||||
*self = IntOrFloat::Float(*v as f64 + n);
|
||||
}
|
||||
IntOrFloat::Float(ref mut v) => {
|
||||
IntOrFloat::Float(v) => {
|
||||
*v += n;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
use nu_plugin::{serve_plugin, MsgPackSerializer};
|
||||
use nu_plugin::{MsgPackSerializer, serve_plugin};
|
||||
use nu_plugin_example::ExamplePlugin;
|
||||
|
||||
fn main() {
|
||||
|
Reference in New Issue
Block a user