File tree Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,20 @@ impl Decode for NameList {
5252 type Error = ssh_encoding:: Error ;
5353}
5454
55+ pub ( crate ) mod macros {
56+ #[ allow( clippy:: crate_in_macro_def) ]
57+ macro_rules! map_err {
58+ ( $result: expr) => {
59+ $result. map_err( |e| crate :: Error :: from( e) )
60+ } ;
61+ }
62+
63+ pub ( crate ) use map_err;
64+ }
65+
66+ #[ cfg( any( feature = "ring" , feature = "aws-lc-rs" ) ) ]
67+ pub ( crate ) use macros:: map_err;
68+
5569#[ doc( hidden) ]
5670pub fn sign_with_hash_alg ( key : & PrivateKeyWithHashAlg , data : & [ u8 ] ) -> ssh_key:: Result < Vec < u8 > > {
5771 Ok ( match key. key_data ( ) {
Original file line number Diff line number Diff line change @@ -94,13 +94,3 @@ compile_error!(
9494
9595#[ cfg( any( feature = "ring" , feature = "aws-lc-rs" ) ) ]
9696include ! ( "lib_inner.rs" ) ;
97-
98- #[ cfg( any( feature = "ring" , feature = "aws-lc-rs" ) ) ]
99- #[ macro_export]
100- #[ doc( hidden) ]
101- #[ allow( clippy:: crate_in_macro_def) ]
102- macro_rules! map_err {
103- ( $result: expr) => {
104- $result. map_err( |e| crate :: Error :: from( e) )
105- } ;
106- }
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ pub use sshbuffer::SshId;
4040
4141mod helpers;
4242
43+ pub ( crate ) use helpers:: map_err;
44+
4345macro_rules! push_packet {
4446 ( $buffer: expr, $x: expr ) => { {
4547 use byteorder:: { BigEndian , ByteOrder } ;
You can’t perform that action at this time.
0 commit comments