File tree 9 files changed +25
-19
lines changed
9 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 1
1
A parser combinator library based on nightly rust.
2
2
3
3
4
-
5
-
6
4
## Tutorial
7
5
8
6
[ Choose your parser combinator] ( src/helpers/readme.md )
Original file line number Diff line number Diff line change 6
6
#![ deny( missing_debug_implementations, missing_copy_implementations) ]
7
7
#![ warn( missing_docs, rustdoc:: missing_crate_level_docs) ]
8
8
#![ doc = include_str ! ( "../readme.md" ) ]
9
- #![ doc( html_logo_url = "https://raw .githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg " ) ]
10
- #![ doc( html_favicon_url = "https://raw .githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg " ) ]
9
+ #![ doc( html_logo_url = "https://avatars .githubusercontent.com/u/91894079 " ) ]
10
+ #![ doc( html_favicon_url = "https://avatars .githubusercontent.com/u/91894079 " ) ]
11
11
12
12
extern crate alloc;
13
13
Original file line number Diff line number Diff line change 1
- #![ doc = include_str ! ( "../readme.md" ) ]
2
- #![ doc( html_root_url = "https://docs.rs/pex-core/0.1.0" ) ]
3
- #![ warn( missing_docs) ]
1
+ #![ deny( missing_debug_implementations, missing_copy_implementations) ]
2
+ #![ warn( missing_docs, rustdoc:: missing_crate_level_docs) ]
3
+ #![ doc = include_str ! ( "../readme.md" ) ]
4
+ #![ doc( html_logo_url = "https://avatars.githubusercontent.com/u/91894079" ) ]
5
+ #![ doc( html_favicon_url = "https://avatars.githubusercontent.com/u/91894079" ) ]
4
6
5
7
pub mod generate;
6
8
mod regex_set;
Original file line number Diff line number Diff line change 1
- use regex_automata:: dfa:: regex:: Regex ;
1
+ use regex_automata:: dfa:: { dense , regex:: Regex } ;
2
2
3
3
pub struct RegexDenseSet {
4
4
name : String ,
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " shallow"
3
- version = " 0.1.1 "
3
+ version = " 0.2.0 "
4
4
authors = [
" Aster <[email protected] >" ]
5
- description = " shallow text"
5
+ description = " shallow long text"
6
6
repository = " https://github.com/oovm/pex"
7
7
documentation = " https://docs.rs/shallow"
8
8
readme = " readme.md"
Original file line number Diff line number Diff line change 1
- # Text Shallower
1
+ # Text Shallow
2
2
3
3
- character by character, place-holder mode
4
4
Original file line number Diff line number Diff line change 1
1
use crate :: string:: ShallowString ;
2
- use std:: { borrow:: Cow , fmt:: Debug } ;
2
+ use alloc:: {
3
+ borrow:: Cow ,
4
+ format,
5
+ string:: { String , ToString } ,
6
+ } ;
7
+ use core:: fmt:: Debug ;
3
8
4
9
/// A builder to create the `ShallowString`.
5
10
///
Original file line number Diff line number Diff line change
1
+ #![ no_std]
1
2
#![ deny( missing_debug_implementations, missing_copy_implementations) ]
2
3
#![ warn( missing_docs, rustdoc:: missing_crate_level_docs) ]
3
4
#![ doc = include_str ! ( "../readme.md" ) ]
4
- #![ doc( html_logo_url = "https://raw.githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg" ) ]
5
- #![ doc( html_favicon_url = "https://raw.githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg" ) ]
5
+ #![ doc( html_logo_url = "https://avatars.githubusercontent.com/u/91894079" ) ]
6
+ #![ doc( html_favicon_url = "https://avatars.githubusercontent.com/u/91894079" ) ]
7
+
8
+ extern crate alloc;
6
9
7
10
mod char_level;
8
11
mod string;
Original file line number Diff line number Diff line change 1
- use std:: {
2
- borrow:: Cow ,
3
- fmt:: { Debug , Formatter } ,
4
- } ;
1
+ use alloc:: borrow:: Cow ;
2
+ use core:: fmt:: { Debug , Formatter } ;
5
3
6
4
/// A placeholder string type
7
5
pub struct ShallowString < ' a > {
8
6
pub ( crate ) raw : Cow < ' a , str > ,
9
7
}
10
8
11
9
impl < ' a > Debug for ShallowString < ' a > {
12
- fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std :: fmt:: Result {
10
+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> core :: fmt:: Result {
13
11
f. write_str ( self . raw . as_ref ( ) )
14
12
}
15
13
}
You can’t perform that action at this time.
0 commit comments