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 54
54
- uses : actions/checkout@v3
55
55
- uses : sfackler/actions/rustup@master
56
56
with :
57
- version : 1.56 .0
57
+ version : 1.81 .0
58
58
- run : echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
59
59
id : rust-version
60
60
- uses : actions/cache@v3
Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ license = "MIT/Apache-2.0"
6
6
description = " An implementation of the stringprep algorithm"
7
7
repository = " https://github.com/sfackler/rust-stringprep"
8
8
readme = " README.md"
9
+ rust-version = " 1.81.0" # For core::error::Error
9
10
10
11
[dependencies ]
11
12
unicode-bidi = " 0.3"
12
13
unicode-normalization = " 0.1"
13
14
unicode-properties = " 0.1.1"
15
+
16
+ [features ]
17
+ std = []
Original file line number Diff line number Diff line change 1
1
//! An implementation of the "stringprep" algorithm defined in [RFC 3454][].
2
2
//!
3
3
//! [RFC 3454]: https://tools.ietf.org/html/rfc3454
4
+ #![ no_std]
4
5
#![ warn( missing_docs) ]
6
+ extern crate alloc;
5
7
extern crate unicode_bidi;
6
8
extern crate unicode_normalization;
7
9
extern crate unicode_properties;
8
10
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;
11
17
use unicode_normalization:: UnicodeNormalization ;
12
18
use unicode_properties:: { GeneralCategoryGroup , UnicodeGeneralCategory } ;
13
19
@@ -44,7 +50,10 @@ impl fmt::Display for Error {
44
50
}
45
51
}
46
52
53
+ #[ cfg( feature = "std" ) ]
47
54
impl std:: error:: Error for Error { }
55
+ #[ cfg( not( feature = "std" ) ) ]
56
+ impl core:: error:: Error for Error { }
48
57
49
58
/// Prepares a string with the SASLprep profile of the stringprep algorithm.
50
59
///
Original file line number Diff line number Diff line change 1
1
//! Character Tables
2
- use std :: cmp:: Ordering ;
3
- use std :: str:: Chars ;
2
+ use core :: cmp:: Ordering ;
3
+ use core :: str:: Chars ;
4
4
use unicode_bidi:: { bidi_class, BidiClass } ;
5
5
use unicode_properties:: { GeneralCategoryGroup , UnicodeGeneralCategory } ;
6
6
You can’t perform that action at this time.
0 commit comments