@@ -26,7 +26,7 @@ pub(crate) fn check_namespace_key_validity(
2626 PrintableString ( secondary_namespace) ,
2727 PrintableString ( key)
2828 ) ;
29- return Err ( std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , msg) ) ;
29+ return Err ( std:: io:: Error :: other ( msg) ) ;
3030 }
3131
3232 if primary_namespace. is_empty ( ) && !secondary_namespace. is_empty ( ) {
@@ -37,7 +37,7 @@ pub(crate) fn check_namespace_key_validity(
3737 let msg = format ! (
3838 "Failed to {} {}/{}/{}: primary namespace may not be empty if a non-empty secondary namespace is given." , operation,
3939 PrintableString ( primary_namespace) , PrintableString ( secondary_namespace) , PrintableString ( key) ) ;
40- return Err ( std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , msg) ) ;
40+ return Err ( std:: io:: Error :: other ( msg) ) ;
4141 }
4242
4343 if !is_valid_kvstore_str ( primary_namespace)
@@ -50,7 +50,7 @@ pub(crate) fn check_namespace_key_validity(
5050 let msg = format ! ( "Failed to {} {}/{}/{}: primary namespace, secondary namespace, and key must be valid." ,
5151 operation,
5252 PrintableString ( primary_namespace) , PrintableString ( secondary_namespace) , PrintableString ( key) ) ;
53- return Err ( std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , msg) ) ;
53+ return Err ( std:: io:: Error :: other ( msg) ) ;
5454 }
5555 } else {
5656 if primary_namespace. is_empty ( ) && !secondary_namespace. is_empty ( ) {
@@ -60,7 +60,7 @@ pub(crate) fn check_namespace_key_validity(
6060 let msg = format ! (
6161 "Failed to {} {}/{}: primary namespace may not be empty if a non-empty secondary namespace is given." ,
6262 operation, PrintableString ( primary_namespace) , PrintableString ( secondary_namespace) ) ;
63- return Err ( std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , msg) ) ;
63+ return Err ( std:: io:: Error :: other ( msg) ) ;
6464 }
6565 if !is_valid_kvstore_str ( primary_namespace) || !is_valid_kvstore_str ( secondary_namespace) {
6666 debug_assert ! (
@@ -76,7 +76,7 @@ pub(crate) fn check_namespace_key_validity(
7676 PrintableString ( primary_namespace) ,
7777 PrintableString ( secondary_namespace)
7878 ) ;
79- return Err ( std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , msg) ) ;
79+ return Err ( std:: io:: Error :: other ( msg) ) ;
8080 }
8181 }
8282
0 commit comments