From fa537d952d44ddfab9306ab760d5e6cdd4d47179 Mon Sep 17 00:00:00 2001 From: Yuma Hiramatsu Date: Sun, 22 Aug 2021 02:50:29 +0900 Subject: [PATCH] Set imports_layout "HorizontalVertical" --- rclrust-msg-gen/src/parser/types.rs | 3 ++- rclrust/examples/logger.rs | 8 +++++++- rclrust/src/clock.rs | 6 +++++- rclrust/src/parameter/mod.rs | 7 +++++-- rclrust/src/parameter/parameters.rs | 7 ++++++- rclrust/src/wait_set.rs | 10 ++++++++-- rustfmt.toml | 1 + 7 files changed, 34 insertions(+), 8 deletions(-) diff --git a/rclrust-msg-gen/src/parser/types.rs b/rclrust-msg-gen/src/parser/types.rs index c761ea04..9d09fed5 100644 --- a/rclrust-msg-gen/src/parser/types.rs +++ b/rclrust-msg-gen/src/parser/types.rs @@ -15,7 +15,8 @@ use super::{ use crate::types::{ primitives::*, sequences::{Array, BoundedSequence, PrimitiveArray, Sequence}, - ConstantType, MemberType, + ConstantType, + MemberType, }; pub fn parse_member_type(s: &str) -> IResult<&str, MemberType> { diff --git a/rclrust/examples/logger.rs b/rclrust/examples/logger.rs index 451156ce..a9ff7029 100644 --- a/rclrust/examples/logger.rs +++ b/rclrust/examples/logger.rs @@ -1,6 +1,12 @@ use anyhow::Result; use rclrust::{ - rclrust_debug, rclrust_error, rclrust_fatal, rclrust_info, rclrust_warn, Clock, Logger, + rclrust_debug, + rclrust_error, + rclrust_fatal, + rclrust_info, + rclrust_warn, + Clock, + Logger, }; use rclrust_msg::geometry_msgs::msg::Twist; diff --git a/rclrust/src/clock.rs b/rclrust/src/clock.rs index d8ec6944..a9d1c8a5 100644 --- a/rclrust/src/clock.rs +++ b/rclrust/src/clock.rs @@ -3,7 +3,11 @@ use std::mem::MaybeUninit; use anyhow::{ensure, Context, Result}; use crate::{ - error::ToRclRustResult, impl_from_trait_for_enum, log::Logger, rclrust_error, time::Time, + error::ToRclRustResult, + impl_from_trait_for_enum, + log::Logger, + rclrust_error, + time::Time, }; /// Time source type, used to indicate the source of a time measurement. diff --git a/rclrust/src/parameter/mod.rs b/rclrust/src/parameter/mod.rs index aaa3efee..8f400716 100644 --- a/rclrust/src/parameter/mod.rs +++ b/rclrust/src/parameter/mod.rs @@ -8,8 +8,11 @@ use std::fmt; pub(crate) use parameters::Parameters; pub(crate) use rcl_params::RclParams; pub(crate) use rclrust_msg::rcl_interfaces::msg::{ - Parameter as RclParameter, ParameterDescriptor, ParameterType as RclParameterType, - ParameterValue as RclParameterValue, SetParametersResult, + Parameter as RclParameter, + ParameterDescriptor, + ParameterType as RclParameterType, + ParameterValue as RclParameterValue, + SetParametersResult, }; pub use type_::ParameterType; pub use value::ParameterValue; diff --git a/rclrust/src/parameter/parameters.rs b/rclrust/src/parameter/parameters.rs index c126d20d..7e7ca5ba 100644 --- a/rclrust/src/parameter/parameters.rs +++ b/rclrust/src/parameter/parameters.rs @@ -3,7 +3,12 @@ use std::{collections::HashMap, sync::Mutex}; use anyhow::Result; use super::{ - Parameter, ParameterDescriptor, ParameterType, ParameterValue, RclParams, SetParametersResult, + Parameter, + ParameterDescriptor, + ParameterType, + ParameterValue, + RclParams, + SetParametersResult, }; use crate::{context::RclContext, error::RclRustError, node::RclNode}; diff --git a/rclrust/src/wait_set.rs b/rclrust/src/wait_set.rs index 725a3345..91beede2 100644 --- a/rclrust/src/wait_set.rs +++ b/rclrust/src/wait_set.rs @@ -1,8 +1,14 @@ use anyhow::{Context, Result}; use crate::{ - client::RclClient, context::RclContext, error::ToRclRustResult, log::Logger, rclrust_error, - service::RclService, subscription::RclSubscription, timer::RclTimer, + client::RclClient, + context::RclContext, + error::ToRclRustResult, + log::Logger, + rclrust_error, + service::RclService, + subscription::RclSubscription, + timer::RclTimer, }; #[derive(Debug)] diff --git a/rustfmt.toml b/rustfmt.toml index 94bf1452..c2c301b3 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,3 +1,4 @@ format_code_in_doc_comments = true group_imports = "StdExternalCrate" imports_granularity = "Crate" +imports_layout = "HorizontalVertical"