Skip to content

Commit f8850ff

Browse files
committed
🚀 Make shallow no std
1 parent 1bd6e5f commit f8850ff

File tree

9 files changed

+25
-19
lines changed

9 files changed

+25
-19
lines changed

‎Readme.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
A parser combinator library based on nightly rust.
22

33

4-
5-
64
## Tutorial
75

86
[Choose your parser combinator](src/helpers/readme.md)

‎projects/pex-core/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#![deny(missing_debug_implementations, missing_copy_implementations)]
77
#![warn(missing_docs, rustdoc::missing_crate_level_docs)]
88
#![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")]
1111

1212
extern crate alloc;
1313

‎projects/pex-trie/src/lib.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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")]
46

57
pub mod generate;
68
mod regex_set;

‎projects/pex-trie/src/regex_set/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use regex_automata::dfa::regex::Regex;
1+
use regex_automata::dfa::{dense, regex::Regex};
22

33
pub struct RegexDenseSet {
44
name: String,

‎projects/shallow/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "shallow"
3-
version = "0.1.1"
3+
version = "0.2.0"
44
authors = ["Aster <[email protected]>"]
5-
description = "shallow text"
5+
description = "shallow long text"
66
repository = "https://github.com/oovm/pex"
77
documentation = "https://docs.rs/shallow"
88
readme = "readme.md"

‎projects/shallow/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Text Shallower
1+
# Text Shallow
22

33
- character by character, place-holder mode
44

‎projects/shallow/src/char_level/mod.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
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;
38

49
/// A builder to create the `ShallowString`.
510
///

‎projects/shallow/src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
#![no_std]
12
#![deny(missing_debug_implementations, missing_copy_implementations)]
23
#![warn(missing_docs, rustdoc::missing_crate_level_docs)]
34
#![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;
69

710
mod char_level;
811
mod string;

‎projects/shallow/src/string/mod.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
use std::{
2-
borrow::Cow,
3-
fmt::{Debug, Formatter},
4-
};
1+
use alloc::borrow::Cow;
2+
use core::fmt::{Debug, Formatter};
53

64
/// A placeholder string type
75
pub struct ShallowString<'a> {
86
pub(crate) raw: Cow<'a, str>,
97
}
108

119
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 {
1311
f.write_str(self.raw.as_ref())
1412
}
1513
}

0 commit comments

Comments
 (0)