Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6a221a

Browse files
authored
Merge pull request#93 from Jules-Bertholet/more-ci-checks
More CI checks
2 parents95aab8d +261ca20 commita6a221a

File tree

12 files changed

+638
-39
lines changed

12 files changed

+638
-39
lines changed

‎.github/workflows/rust.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ on:
77
branches:[ master ]
88

99
env:
10+
CARGO_INCREMENTAL:0
1011
CARGO_TERM_COLOR:always
12+
RUST_BACKTRACE:1
13+
RUSTFLAGS:-D warnings
14+
RUSTDOCFLAGS:-D warnings --cfg docsrs
1115

1216
jobs:
1317
build:
@@ -20,28 +24,50 @@ jobs:
2024
-nightly
2125
steps:
2226
-uses:actions/checkout@v2
23-
-name:Installlatest nightly
27+
-name:Installtoolchain
2428
uses:actions-rs/toolchain@v1
2529
with:
2630
toolchain:${{ matrix.rust }}
2731
override:true
2832
-name:Build
2933
run:cargo build --verbose
30-
-name:Run tests
31-
run:cargo test --verbose
34+
-name:Run tests with all features
35+
run:cargo test --all-features --verbose
3236
-name:Run tests without features
33-
run:cargo test --verbose --no-default-features
37+
run:cargo test --no-default-features --verbose
3438
-name:Package
3539
run:cargo package
3640
-name:Test package
3741
run:cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test
3842
-name:Test package without features
3943
run:cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test --no-default-features
44+
-name:Build docs
45+
if:matrix.rust == 'nightly'
46+
run:cargo doc --all-features --verbose
47+
-name:Check formatting
48+
if:matrix.rust == 'stable'
49+
run:cargo fmt --all --check
50+
-name:Check clippy
51+
if:matrix.rust == 'stable'
52+
run:cargo clippy --all-features --all --verbose
53+
msrv:
54+
runs-on:ubuntu-latest
55+
steps:
56+
-uses:actions/checkout@v2
57+
-name:Install msrv toolchain
58+
uses:actions-rs/toolchain@v1
59+
with:
60+
toolchain:1.36
61+
override:true
62+
-name:Build
63+
run:cargo build --verbose --all-features
4064
regen:
4165
runs-on:ubuntu-latest
4266
steps:
4367
-uses:actions/checkout@v3
4468
-name:Regen
4569
run:cd scripts && python3 unicode.py
46-
-name:Diff
70+
-name:Diff tables
4771
run:diff src/tables.rs scripts/tables.rs
72+
-name:Diff tests
73+
run:diff tests/data/normalization_tests.rs scripts/normalization_tests.rs

‎Cargo.toml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@
22

33
name ="unicode-normalization"
44
version ="0.1.23"
5-
authors = ["kwantam <kwantam@gmail.com>","Manish Goregaokar <manishsmail@gmail.com>"]
5+
authors = [
6+
"kwantam <kwantam@gmail.com>",
7+
"Manish Goregaokar <manishsmail@gmail.com>",
8+
]
69

710
homepage ="https://github.com/unicode-rs/unicode-normalization"
811
repository ="https://github.com/unicode-rs/unicode-normalization"
912
documentation ="https://docs.rs/unicode-normalization/"
1013

1114
license ="MIT/Apache-2.0"
12-
keywords = ["text","unicode","normalization","decomposition","recomposition"]
15+
keywords = [
16+
"text",
17+
"unicode",
18+
"normalization",
19+
"decomposition",
20+
"recomposition",
21+
]
1322
readme ="README.md"
1423
description ="""
1524
This crate provides functions for normalization of
@@ -18,9 +27,11 @@ Decomposition and Recomposition, as described in
1827
Unicode Standard Annex #15.
1928
"""
2029

30+
rust-version ="1.36"
31+
2132
edition ="2018"
2233

23-
exclude = ["target/*","Cargo.lock","scripts/tmp","*.txt","tests/*"]
34+
exclude = ["target/*","Cargo.lock","scripts/tmp","*.txt","tests/*"]
2435

2536
[dependencies.tinyvec]
2637
version ="1"

‎scripts/unicode.py

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ def minimal_perfect_hash(d):
579579
data=UnicodeData()
580580
withopen("tables.rs","w",newline="\n")asout:
581581
out.write(PREAMBLE)
582+
out.write("#![cfg_attr(rustfmt, rustfmt::skip)]\n")
582583
out.write("use crate::quick_check::IsNormalized;\n")
583584
out.write("use crate::quick_check::IsNormalized::*;\n")
584585
out.write("\n")

‎src/__test_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// If you're caught using this outside this crates tests/, you get to clean up the mess.
66

77
#[cfg(not(feature ="std"))]
8-
usecrate::no_std_prelude::*;
8+
usealloc::string::String;
99

1010
usecrate::stream_safe::StreamSafe;
1111

‎src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,7 @@ pub use crate::recompose::Recompositions;
6262
pubusecrate::replace::Replacements;
6363
pubusecrate::stream_safe::StreamSafe;
6464
pubusecrate::tables::UNICODE_VERSION;
65-
use core::{
66-
str::Chars,
67-
option,
68-
};
69-
70-
mod no_std_prelude;
65+
use core::{option, str::Chars};
7166

7267
mod decompose;
7368
mod lookups;
@@ -169,7 +164,6 @@ impl<'a> UnicodeNormalization<Chars<'a>> for &'a str {
169164
}
170165
}
171166

172-
173167
implUnicodeNormalization<option::IntoIter<char>>forchar{
174168
#[inline]
175169
fnnfd(self) ->Decompositions<option::IntoIter<char>>{

‎src/no_std_prelude.rs

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎src/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::lookups::{
1414
compatibility_fully_decomposed, composition_table,
1515
};
1616

17-
use core::{char, ops::FnMut};
17+
use core::char;
1818

1919
/// Compute canonical Unicode decomposition for character.
2020
/// See [Unicode Standard Annex #15](http://www.unicode.org/reports/tr15/)

‎src/stream_safe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ mod tests {
114114
usecrate::normalize::decompose_compatible;
115115

116116
#[cfg(not(feature ="std"))]
117-
usecrate::no_std_prelude::*;
117+
usealloc::{string::String, vec::Vec};
118118

119119
use core::char;
120120

‎src/tables.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// NOTE: The following code was generated by "scripts/unicode.py", do not edit directly
1212

1313
#![allow(missing_docs)]
14+
#![cfg_attr(rustfmt, rustfmt::skip)]
1415
use crate::quick_check::IsNormalized;
1516
use crate::quick_check::IsNormalized::*;
1617

‎src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use super::UnicodeNormalization;
1313
use core::char;
1414

1515
#[cfg(not(feature ="std"))]
16-
usecrate::no_std_prelude::*;
16+
usealloc::string::{String,ToString};
1717

1818
#[test]
1919
fntest_nfd(){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp