mirror of
https://github.com/RGBCube/embd-rs
synced 2025-05-31 11:08:11 +00:00
Increase max with to 120
This commit is contained in:
parent
9ec0768a8e
commit
3d45164562
7 changed files with 49 additions and 62 deletions
|
@ -1,2 +1,2 @@
|
||||||
[build]
|
[build]
|
||||||
rustflags = [ "--cfg", "procmacro2_semver_exempt" ]
|
rustflags = ["--cfg", "procmacro2_semver_exempt"]
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
condense_wildcard_suffixes = true
|
condense_wildcard_suffixes = true
|
||||||
|
max_width = 120
|
||||||
enum_discrim_align_threshold = 25
|
enum_discrim_align_threshold = 25
|
||||||
force_explicit_abi = false
|
force_explicit_abi = false
|
||||||
force_multiline_blocks = true
|
force_multiline_blocks = true
|
||||||
format_code_in_doc_comments = true
|
format_code_in_doc_comments = true
|
||||||
format_macro_matchers = true
|
format_macro_matchers = true
|
||||||
format_strings = true
|
format_strings = true
|
||||||
group_imports = "StdExternalCrate"
|
group_imports = "StdExternalCrate"
|
||||||
hex_literal_case = "Upper"
|
hex_literal_case = "Upper"
|
||||||
imports_granularity = "Crate"
|
imports_granularity = "Crate"
|
||||||
imports_layout = "Vertical"
|
imports_layout = "Vertical"
|
||||||
match_block_trailing_comma = true
|
match_block_trailing_comma = true
|
||||||
newline_style = "Unix"
|
newline_style = "Unix"
|
||||||
normalize_comments = true
|
normalize_comments = true
|
||||||
normalize_doc_attributes = true
|
normalize_doc_attributes = true
|
||||||
reorder_impl_items = true
|
reorder_impl_items = true
|
||||||
unstable_features = true
|
unstable_features = true
|
||||||
use_try_shorthand = true
|
use_try_shorthand = true
|
||||||
wrap_comments = true
|
wrap_comments = true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [ "embd", "embd-macros" ]
|
members = ["embd", "embd-macros"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
[package]
|
[package]
|
||||||
name = "embd-macros"
|
name = "embd-macros"
|
||||||
description = "Read files or directories from the filesystem at runtime on debug, embed on release."
|
description = "Read files or directories from the filesystem at runtime on debug, embed on release."
|
||||||
repository = "https://github.com/RGBCube/embd-rs"
|
repository = "https://github.com/RGBCube/embd-rs"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
keywords = [ "embedding", "files", "debug-optimization", "bundling" ]
|
keywords = ["embedding", "files", "debug-optimization", "bundling"]
|
||||||
categories = [ "filesystem" ]
|
categories = ["filesystem"]
|
||||||
authors = [ "RGBCube" ]
|
authors = ["RGBCube"]
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
include = [ "src/**/*.rs", "../README.md" ]
|
include = ["src/**/*.rs", "../README.md"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustc-args = [ "--cfg", "procmacro2_semver_exempt" ]
|
rustc-args = ["--cfg", "procmacro2_semver_exempt"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
proc-macro2 = { version = "1", features = [ "span-locations" ] }
|
proc-macro2 = { version = "1", features = ["span-locations"] }
|
||||||
quote = "1"
|
quote = "1"
|
||||||
syn = "2"
|
syn = "2"
|
||||||
|
|
|
@ -78,10 +78,7 @@ fn dir_release(input: TokenStream, path: &str) -> TokenStream {
|
||||||
|
|
||||||
let base = neighbor.parent().expect("Failed to get the parent of file");
|
let base = neighbor.parent().expect("Failed to get the parent of file");
|
||||||
|
|
||||||
let directory = base
|
let directory = base.join(path).canonicalize().expect("Failed to canonicalize path");
|
||||||
.join(path)
|
|
||||||
.canonicalize()
|
|
||||||
.expect("Failed to canonicalize path");
|
|
||||||
|
|
||||||
let directory_str = directory.to_str().expect("Failed to convert OsStr to str");
|
let directory_str = directory.to_str().expect("Failed to convert OsStr to str");
|
||||||
|
|
||||||
|
@ -108,9 +105,7 @@ fn read_dir(directory: &Path) -> TokenVec {
|
||||||
.to_str()
|
.to_str()
|
||||||
.expect("Failed to get the string representation of PathBuf");
|
.expect("Failed to get the string representation of PathBuf");
|
||||||
|
|
||||||
let filetype = fs::metadata(&path)
|
let filetype = fs::metadata(&path).expect("Failed to get file metadata").file_type();
|
||||||
.expect("Failed to get file metadata")
|
|
||||||
.file_type();
|
|
||||||
|
|
||||||
if filetype.is_dir() {
|
if filetype.is_dir() {
|
||||||
let children = read_dir(&path);
|
let children = read_dir(&path);
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "embd"
|
name = "embd"
|
||||||
description = "Read files or directories from the filesystem at runtime on debug, embed on release."
|
description = "Read files or directories from the filesystem at runtime on debug, embed on release."
|
||||||
repository = "https://github.com/RGBCube/embd-rs"
|
repository = "https://github.com/RGBCube/embd-rs"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
keywords = [ "embedding", "files", "debug-optimization", "bundling" ]
|
keywords = ["embedding", "files", "debug-optimization", "bundling"]
|
||||||
categories = [ "filesystem" ]
|
categories = ["filesystem"]
|
||||||
authors = [ "RGBCube" ]
|
authors = ["RGBCube"]
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
include = [ "src/**/*.rs", "../README.md" ]
|
include = ["src/**/*.rs", "../README.md"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustc-args = [ "--cfg", "procmacro2_semver_exempt" ]
|
rustc-args = ["--cfg", "procmacro2_semver_exempt"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
embd-macros = "0.1"
|
embd-macros = "0.1"
|
||||||
|
|
|
@ -171,15 +171,9 @@ fn read_dir(directory: &Path) -> Vec<DirEntry> {
|
||||||
|
|
||||||
let filetype = entry.file_type().expect("Failed to read entry filetype");
|
let filetype = entry.file_type().expect("Failed to read entry filetype");
|
||||||
|
|
||||||
let path = entry
|
let path = entry.path().canonicalize().expect("Failed to canonicalize path");
|
||||||
.path()
|
|
||||||
.canonicalize()
|
|
||||||
.expect("Failed to canonicalize path");
|
|
||||||
|
|
||||||
let path_str = path
|
let path_str = path.to_str().expect("Failed to convert OsStr to str").to_string();
|
||||||
.to_str()
|
|
||||||
.expect("Failed to convert OsStr to str")
|
|
||||||
.to_string();
|
|
||||||
|
|
||||||
if filetype.is_dir() {
|
if filetype.is_dir() {
|
||||||
let children = read_dir(&path);
|
let children = read_dir(&path);
|
||||||
|
@ -210,10 +204,7 @@ pub fn __dir_runtime(neighbor: &str, path: &str) -> Dir {
|
||||||
.canonicalize()
|
.canonicalize()
|
||||||
.expect("Failed to canonicalize path");
|
.expect("Failed to canonicalize path");
|
||||||
|
|
||||||
let directory_str = directory
|
let directory_str = directory.to_str().expect("Failed to convert OsStr to str").to_string();
|
||||||
.to_str()
|
|
||||||
.expect("Failed to convert OsStr to str")
|
|
||||||
.to_string();
|
|
||||||
|
|
||||||
let children = read_dir(&directory);
|
let children = read_dir(&directory);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue