From 06b8797d17cf8d18ecb41d65f4466b8abecbb585 Mon Sep 17 00:00:00 2001 From: wangmengc Date: Wed, 16 Aug 2023 09:21:00 +0800 Subject: [PATCH] fixed declare command brackets s format --- bash-5.1/builtins_rust/setattr/src/lib.rs | 8 ++++---- record.txt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bash-5.1/builtins_rust/setattr/src/lib.rs b/bash-5.1/builtins_rust/setattr/src/lib.rs index a6de56a..b386676 100644 --- a/bash-5.1/builtins_rust/setattr/src/lib.rs +++ b/bash-5.1/builtins_rust/setattr/src/lib.rs @@ -592,10 +592,10 @@ pub unsafe extern "C" fn r_print_array_assignment(var: *mut SHELL_VAR, quote: c_ if vstr == std::ptr::null_mut() { if quote != 0 { - println!("{}=\"\'()\'\"",CStr::from_ptr((*var).name).to_str().unwrap()); + println!("{}=\'()\'",CStr::from_ptr((*var).name).to_str().unwrap()); } else { - println!("{}=\"()\"",CStr::from_ptr((*var).name).to_str().unwrap()); + println!("{}=()",CStr::from_ptr((*var).name).to_str().unwrap()); } } else { @@ -610,10 +610,10 @@ pub unsafe extern "C" fn r_print_assoc_assignment(var: *mut SHELL_VAR, quote: c_ if vstr == std::ptr::null_mut() { if quote != 0 { - println!("{}=\"\'()\'\"",CStr::from_ptr((*var).name).to_str().unwrap()); + println!("{}=\'()\'",CStr::from_ptr((*var).name).to_str().unwrap()); } else { - println!("{}=\"()\"",CStr::from_ptr((*var).name).to_str().unwrap()); + println!("{}=()",CStr::from_ptr((*var).name).to_str().unwrap()); } } else { diff --git a/record.txt b/record.txt index 6bf497d..a22226c 100644 --- a/record.txt +++ b/record.txt @@ -124,3 +124,4 @@ 123 124 125 +126 -- Gitee