From 73f3d693303f99dc2498d2ae0e098bd89e9e5317 Mon Sep 17 00:00:00 2001 From: Ben C Date: Thu, 5 Mar 2026 11:43:20 -0500 Subject: [PATCH] Formatter --- README.md | 3 ++- src/client.rs | 2 +- src/commands/call.rs | 2 +- src/commands/get.rs | 2 +- src/commands/get_all.rs | 2 +- src/commands/introspect.rs | 2 +- src/commands/list.rs | 2 +- src/commands/set.rs | 2 +- src/convert.rs | 6 +++--- src/introspection.rs | 2 +- src/main.rs | 2 +- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index eab4775..318545d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # nu_plugin_dbus -Fork of that I try to keep more up-to-date. +Fork of that I try to keep more +up-to-date. [Nushell](https://nushell.sh/) plugin for interacting with [D-Bus](https://dbus.freedesktop.org/) diff --git a/src/client.rs b/src/client.rs index 759d225..bb0577d 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,7 +1,7 @@ use dbus::{ + Message, arg::messageitem::MessageItem, channel::{BusType, Channel}, - Message, }; use nu_protocol::{LabeledError, Spanned, Value}; diff --git a/src/commands/call.rs b/src/commands/call.rs index b8962a1..38b1181 100644 --- a/src/commands/call.rs +++ b/src/commands/call.rs @@ -1,7 +1,7 @@ use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{Example, LabeledError, Signature, SyntaxShape, Type, Value}; -use crate::{client::DbusClient, config::DbusClientConfig, DbusSignatureUtilExt}; +use crate::{DbusSignatureUtilExt, client::DbusClient, config::DbusClientConfig}; pub struct Call; diff --git a/src/commands/get.rs b/src/commands/get.rs index bce14b9..9c33dcf 100644 --- a/src/commands/get.rs +++ b/src/commands/get.rs @@ -1,7 +1,7 @@ use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{Example, LabeledError, Signature, SyntaxShape, Type, Value}; -use crate::{client::DbusClient, config::DbusClientConfig, DbusSignatureUtilExt}; +use crate::{DbusSignatureUtilExt, client::DbusClient, config::DbusClientConfig}; pub struct Get; diff --git a/src/commands/get_all.rs b/src/commands/get_all.rs index c1f7359..f0adf80 100644 --- a/src/commands/get_all.rs +++ b/src/commands/get_all.rs @@ -1,7 +1,7 @@ use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{Example, LabeledError, Signature, SyntaxShape, Type, Value}; -use crate::{client::DbusClient, config::DbusClientConfig, DbusSignatureUtilExt}; +use crate::{DbusSignatureUtilExt, client::DbusClient, config::DbusClientConfig}; pub struct GetAll; diff --git a/src/commands/introspect.rs b/src/commands/introspect.rs index e88ed75..fbe4eb4 100644 --- a/src/commands/introspect.rs +++ b/src/commands/introspect.rs @@ -1,7 +1,7 @@ use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{Example, LabeledError, Signature, SyntaxShape, Type, Value}; -use crate::{client::DbusClient, config::DbusClientConfig, DbusSignatureUtilExt}; +use crate::{DbusSignatureUtilExt, client::DbusClient, config::DbusClientConfig}; pub struct Introspect; diff --git a/src/commands/list.rs b/src/commands/list.rs index ce6ec39..ceae7f5 100644 --- a/src/commands/list.rs +++ b/src/commands/list.rs @@ -1,7 +1,7 @@ use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{Example, LabeledError, Signature, SyntaxShape, Type, Value}; -use crate::{client::DbusClient, config::DbusClientConfig, pattern::Pattern, DbusSignatureUtilExt}; +use crate::{DbusSignatureUtilExt, client::DbusClient, config::DbusClientConfig, pattern::Pattern}; pub struct List; diff --git a/src/commands/set.rs b/src/commands/set.rs index 635299e..75d4c7e 100644 --- a/src/commands/set.rs +++ b/src/commands/set.rs @@ -1,7 +1,7 @@ use nu_plugin::{EngineInterface, EvaluatedCall, SimplePluginCommand}; use nu_protocol::{Example, LabeledError, Signature, SyntaxShape, Type, Value}; -use crate::{client::DbusClient, config::DbusClientConfig, DbusSignatureUtilExt}; +use crate::{DbusSignatureUtilExt, client::DbusClient, config::DbusClientConfig}; pub struct Set; diff --git a/src/convert.rs b/src/convert.rs index 11e5e7c..c26ca10 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -1,9 +1,9 @@ use dbus::{ + Message, Signature, arg::{ - messageitem::{MessageItem, MessageItemArray, MessageItemDict}, ArgType, RefArg, + messageitem::{MessageItem, MessageItemArray, MessageItemDict}, }, - Message, Signature, }; use nu_protocol::{LabeledError, Record, Span, Value}; use std::str::FromStr; @@ -87,7 +87,7 @@ pub fn from_refarg(refarg: &dyn RefArg, span: Span) -> Result { ), ArgType::DictEntry => { - return Err("Encountered dictionary entry outside of dictionary".into()) + return Err("Encountered dictionary entry outside of dictionary".into()); } ArgType::Invalid => return Err("Encountered invalid D-Bus value".into()), }) diff --git a/src/introspection.rs b/src/introspection.rs index ae1a83a..655eeda 100644 --- a/src/introspection.rs +++ b/src/introspection.rs @@ -1,4 +1,4 @@ -use nu_protocol::{record, Span, Value}; +use nu_protocol::{Span, Value, record}; use serde::Deserialize; use serde_xml_rs::SerdeXml; diff --git a/src/main.rs b/src/main.rs index cdd38b7..74bdd3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use nu_plugin::{serve_plugin, MsgPackSerializer, Plugin, PluginCommand}; +use nu_plugin::{MsgPackSerializer, Plugin, PluginCommand, serve_plugin}; use nu_protocol::SyntaxShape; mod client; -- 2.51.2