File tree Expand file tree Collapse file tree 4 files changed +18
-5
lines changed Expand file tree Collapse file tree 4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 5454 - uses : actions/checkout@v3
5555 - uses : sfackler/actions/rustup@master
5656 with :
57- version : 1.56 .0
57+ version : 1.81 .0
5858 - run : echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
5959 id : rust-version
6060 - uses : actions/cache@v3
Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ license = "MIT/Apache-2.0"
66description = " An implementation of the stringprep algorithm"
77repository = " https://github.com/sfackler/rust-stringprep"
88readme = " README.md"
9+ rust-version = " 1.81.0" # For core::error::Error
910
1011[dependencies ]
1112unicode-bidi = " 0.3"
1213unicode-normalization = " 0.1"
1314unicode-properties = " 0.1.1"
15+
16+ [features ]
17+ std = []
Original file line number Diff line number Diff line change 11//! An implementation of the "stringprep" algorithm defined in [RFC 3454][].
22//!
33//! [RFC 3454]: https://tools.ietf.org/html/rfc3454
4+ #![ no_std]
45#![ warn( missing_docs) ]
6+ extern crate alloc;
57extern crate unicode_bidi;
68extern crate unicode_normalization;
79extern crate unicode_properties;
810
9- use std:: borrow:: Cow ;
10- use std:: fmt;
11+ #[ cfg( feature = "std" ) ]
12+ extern crate std;
13+
14+ use alloc:: borrow:: Cow ;
15+ use alloc:: string:: String ;
16+ use core:: fmt;
1117use unicode_normalization:: UnicodeNormalization ;
1218use unicode_properties:: { GeneralCategoryGroup , UnicodeGeneralCategory } ;
1319
@@ -44,7 +50,10 @@ impl fmt::Display for Error {
4450 }
4551}
4652
53+ #[ cfg( feature = "std" ) ]
4754impl std:: error:: Error for Error { }
55+ #[ cfg( not( feature = "std" ) ) ]
56+ impl core:: error:: Error for Error { }
4857
4958/// Prepares a string with the SASLprep profile of the stringprep algorithm.
5059///
Original file line number Diff line number Diff line change 11//! Character Tables
2- use std :: cmp:: Ordering ;
3- use std :: str:: Chars ;
2+ use core :: cmp:: Ordering ;
3+ use core :: str:: Chars ;
44use unicode_bidi:: { bidi_class, BidiClass } ;
55use unicode_properties:: { GeneralCategoryGroup , UnicodeGeneralCategory } ;
66
You can’t perform that action at this time.
0 commit comments