Skip to content

Commit 546efae

Browse files
committed
release: 0.7.2
2 parents 547f475 + 11bb387 commit 546efae

File tree

9 files changed

+90
-88
lines changed

9 files changed

+90
-88
lines changed

CREDITS.md

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,72 @@
11
# Project Dependencies
22
Package: cargo-bashman
3-
Version: 0.7.1
3+
Version: 0.7.2
44
Target: x86_64-unknown-linux-gnu
5-
Generated: 2025-04-03 20:00:21 UTC
5+
Generated: 2025-05-16 03:01:47 UTC
66

77
| Package | Version | Author(s) | License |
88
| ---- | ---- | ---- | ---- |
9-
| [**adbyss_psl**](https://github.com/Blobfolio/adbyss) | 0.16.1 | [Josh Stoik](mailto:[email protected]) | WTFPL |
9+
| [**adbyss_psl**](https://github.com/Blobfolio/adbyss) | 0.17.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
1010
| [**argyle**](https://github.com/Blobfolio/argyle) | 0.12.3 | [Josh Stoik](mailto:[email protected]) | WTFPL |
11-
| [bitflags](https://github.com/bitflags/bitflags) | 2.9.0 | The Rust Project Developers | MIT OR Apache-2.0 |
12-
| [cc](https://github.com/rust-lang/cc-rs) ⚒️ | 1.2.17 | [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
11+
| [bitflags](https://github.com/bitflags/bitflags) | 2.9.1 | The Rust Project Developers | MIT OR Apache-2.0 |
12+
| [cc](https://github.com/rust-lang/cc-rs) ⚒️ | 1.2.22 | [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
1313
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
14-
| [**dactyl**](https://github.com/Blobfolio/dactyl) | 0.10.1 | [Josh Stoik](mailto:[email protected]) | WTFPL |
14+
| [**dactyl**](https://github.com/Blobfolio/dactyl) | 0.10.2 | [Josh Stoik](mailto:[email protected]) | WTFPL |
1515
| [displaydoc](https://github.com/yaahc/displaydoc) | 0.2.5 | [Jane Lusby](mailto:[email protected]) | MIT OR Apache-2.0 |
1616
| [fastrand](https://github.com/smol-rs/fastrand) | 2.3.0 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 OR MIT |
1717
| [form_urlencoded](https://github.com/servo/rust-url) | 1.2.1 | The rust-url developers | MIT OR Apache-2.0 |
18-
| [**fyi_msg**](https://github.com/Blobfolio/fyi) | 2.0.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
19-
| [getrandom](https://github.com/rust-random/getrandom) | 0.3.2 | The Rand Project Developers | MIT OR Apache-2.0 |
20-
| [icu_collections](https://github.com/unicode-org/icu4x) | 1.5.0 | The ICU4X Project Developers | Unicode-3.0 |
21-
| [icu_locid](https://github.com/unicode-org/icu4x) | 1.5.0 | The ICU4X Project Developers | Unicode-3.0 |
22-
| [icu_locid_transform](https://github.com/unicode-org/icu4x) | 1.5.0 | The ICU4X Project Developers | Unicode-3.0 |
23-
| [icu_locid_transform_data](https://github.com/unicode-org/icu4x) | 1.5.1 | The ICU4X Project Developers | Unicode-3.0 |
24-
| [icu_normalizer](https://github.com/unicode-org/icu4x) | 1.5.0 | The ICU4X Project Developers | Unicode-3.0 |
25-
| [icu_normalizer_data](https://github.com/unicode-org/icu4x) | 1.5.1 | The ICU4X Project Developers | Unicode-3.0 |
26-
| [icu_properties](https://github.com/unicode-org/icu4x) | 1.5.1 | The ICU4X Project Developers | Unicode-3.0 |
27-
| [icu_properties_data](https://github.com/unicode-org/icu4x) | 1.5.1 | The ICU4X Project Developers | Unicode-3.0 |
28-
| [icu_provider](https://github.com/unicode-org/icu4x) | 1.5.0 | The ICU4X Project Developers | Unicode-3.0 |
29-
| [icu_provider_macros](https://github.com/unicode-org/icu4x) | 1.5.0 | The ICU4X Project Developers | Unicode-3.0 |
18+
| [**fyi_ansi**](https://github.com/Blobfolio/fyi) | 2.1.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
19+
| [**fyi_msg**](https://github.com/Blobfolio/fyi) | 2.1.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
20+
| [getrandom](https://github.com/rust-random/getrandom) | 0.3.3 | The Rand Project Developers | MIT OR Apache-2.0 |
21+
| [icu_collections](https://github.com/unicode-org/icu4x) | 2.0.0 | The ICU4X Project Developers | Unicode-3.0 |
22+
| [icu_locale_core](https://github.com/unicode-org/icu4x) | 2.0.0 | The ICU4X Project Developers | Unicode-3.0 |
23+
| [icu_normalizer](https://github.com/unicode-org/icu4x) | 2.0.0 | The ICU4X Project Developers | Unicode-3.0 |
24+
| [icu_normalizer_data](https://github.com/unicode-org/icu4x) | 2.0.0 | The ICU4X Project Developers | Unicode-3.0 |
25+
| [icu_properties](https://github.com/unicode-org/icu4x) | 2.0.0 | The ICU4X Project Developers | Unicode-3.0 |
26+
| [icu_properties_data](https://github.com/unicode-org/icu4x) | 2.0.0 | The ICU4X Project Developers | Unicode-3.0 |
27+
| [icu_provider](https://github.com/unicode-org/icu4x) | 2.0.0 | The ICU4X Project Developers | Unicode-3.0 |
3028
| [idna](https://github.com/servo/rust-url/) | 1.0.3 | The rust-url developers | MIT OR Apache-2.0 |
31-
| [idna_adapter](https://github.com/hsivonen/idna_adapter) | 1.2.0 | The rust-url developers | Apache-2.0 OR MIT |
29+
| [idna_adapter](https://github.com/hsivonen/idna_adapter) | 1.2.1 | The rust-url developers | Apache-2.0 OR MIT |
3230
| [itoa](https://github.com/dtolnay/itoa) | 1.0.15 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
33-
| [libc](https://github.com/rust-lang/libc) | 0.2.171 | The Rust Project Developers | MIT OR Apache-2.0 |
34-
| [libdeflate-sys](https://github.com/adamkewley/libdeflater) | 1.23.1 | [Adam Kewley](mailto:[email protected]) | Apache-2.0 |
35-
| [**libdeflater**](https://github.com/adamkewley/libdeflater) | 1.23.1 | [Adam Kewley](mailto:[email protected]) | Apache-2.0 |
36-
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | 0.9.3 | [Dan Gohman](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
37-
| [litemap](https://github.com/unicode-org/icu4x) | 0.7.5 | The ICU4X Project Developers | Unicode-3.0 |
31+
| [libc](https://github.com/rust-lang/libc) | 0.2.172 | The Rust Project Developers | MIT OR Apache-2.0 |
32+
| [libdeflate-sys](https://github.com/adamkewley/libdeflater) | 1.24.0 | [Adam Kewley](mailto:[email protected]) | Apache-2.0 |
33+
| [**libdeflater**](https://github.com/adamkewley/libdeflater) | 1.24.0 | [Adam Kewley](mailto:[email protected]) | Apache-2.0 |
34+
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | 0.9.4 | [Dan Gohman](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
35+
| [litemap](https://github.com/unicode-org/icu4x) | 0.8.0 | The ICU4X Project Developers | Unicode-3.0 |
3836
| [memchr](https://github.com/BurntSushi/memchr) | 2.7.4 | [Andrew Gallant](mailto:[email protected]) and bluss | Unlicense OR MIT |
3937
| [once_cell](https://github.com/matklad/once_cell) | 1.21.3 | [Aleksey Kladov](mailto:[email protected]) | MIT OR Apache-2.0 |
4038
| [**oxford_join**](https://github.com/Blobfolio/oxford_join) | 0.5.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
4139
| [percent-encoding](https://github.com/servo/rust-url/) | 2.3.1 | The rust-url developers | MIT OR Apache-2.0 |
42-
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | 1.0.94 | [David Tolnay](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
40+
| [potential_utf](https://github.com/unicode-org/icu4x) | 0.1.2 | The ICU4X Project Developers | Unicode-3.0 |
41+
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | 1.0.95 | [David Tolnay](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
4342
| [quote](https://github.com/dtolnay/quote) | 1.0.40 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
44-
| [rustix](https://github.com/bytecodealliance/rustix) | 1.0.5 | [Dan Gohman](mailto:[email protected]) and [Jakub Konka](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
43+
| [rustix](https://github.com/bytecodealliance/rustix) | 1.0.7 | [Dan Gohman](mailto:[email protected]) and [Jakub Konka](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
4544
| [ryu](https://github.com/dtolnay/ryu) | 1.0.20 | [David Tolnay](mailto:[email protected]) | Apache-2.0 OR BSL-1.0 |
4645
| [**semver**](https://github.com/dtolnay/semver) | 1.0.26 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
4746
| [**serde**](https://github.com/serde-rs/serde) | 1.0.219 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
4847
| [serde_derive](https://github.com/serde-rs/serde) | 1.0.219 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
4948
| [**serde_json**](https://github.com/serde-rs/json) | 1.0.140 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
5049
| [shlex](https://github.com/comex/rust-shlex) ⚒️ | 1.3.0 | [comex](mailto:[email protected]), [Fenhl](mailto:[email protected]), [Adrian Taylor](mailto:[email protected]), [Alex Touchet](mailto:[email protected]), [Daniel Parks](mailto:dp+[email protected]), and [Garrett Berg](mailto:[email protected]) | MIT OR Apache-2.0 |
51-
| [smallvec](https://github.com/servo/rust-smallvec) | 1.14.0 | The Servo Project Developers | MIT OR Apache-2.0 |
50+
| [smallvec](https://github.com/servo/rust-smallvec) | 1.15.0 | The Servo Project Developers | MIT OR Apache-2.0 |
5251
| [stable_deref_trait](https://github.com/storyyeller/stable_deref_trait) | 1.2.0 | [Robert Grosse](mailto:[email protected]) | MIT OR Apache-2.0 |
53-
| [syn](https://github.com/dtolnay/syn) | 2.0.100 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
54-
| [synstructure](https://github.com/mystor/synstructure) | 0.13.1 | [Nika Layzell](mailto:[email protected]) | MIT |
55-
| [tempfile](https://github.com/Stebalien/tempfile) | 3.19.1 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | MIT OR Apache-2.0 |
56-
| [tinystr](https://github.com/unicode-org/icu4x) | 0.7.6 | The ICU4X Project Developers | Unicode-3.0 |
52+
| [syn](https://github.com/dtolnay/syn) | 2.0.101 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
53+
| [synstructure](https://github.com/mystor/synstructure) | 0.13.2 | [Nika Layzell](mailto:[email protected]) | MIT |
54+
| [tempfile](https://github.com/Stebalien/tempfile) | 3.20.0 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | MIT OR Apache-2.0 |
55+
| [tinystr](https://github.com/unicode-org/icu4x) | 0.8.1 | The ICU4X Project Developers | Unicode-3.0 |
5756
| [**trimothy**](https://github.com/Blobfolio/trimothy) | 0.7.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
5857
| [unicode-ident](https://github.com/dtolnay/unicode-ident) | 1.0.18 | [David Tolnay](mailto:[email protected]) | (MIT OR Apache-2.0) AND Unicode-3.0 |
5958
| [**url**](https://github.com/servo/rust-url) | 2.5.4 | The rust-url developers | MIT OR Apache-2.0 |
60-
| [**utc2k**](https://github.com/Blobfolio/utc2k) | 0.12.1 | [Josh Stoik](mailto:[email protected]) | WTFPL |
61-
| [utf16_iter](https://github.com/hsivonen/utf16_iter) | 1.0.5 | [Henri Sivonen](mailto:[email protected]) | Apache-2.0 OR MIT |
59+
| [**utc2k**](https://github.com/Blobfolio/utc2k) | 0.13.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
6260
| [utf8_iter](https://github.com/hsivonen/utf8_iter) | 1.0.4 | [Henri Sivonen](mailto:[email protected]) | Apache-2.0 OR MIT |
63-
| [write16](https://github.com/hsivonen/write16) | 1.0.0 | | Apache-2.0 OR MIT |
6461
| [**write_atomic**](https://github.com/Blobfolio/write_atomic) | 0.6.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
65-
| [writeable](https://github.com/unicode-org/icu4x) | 0.5.5 | The ICU4X Project Developers | Unicode-3.0 |
66-
| [yoke](https://github.com/unicode-org/icu4x) | 0.7.5 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
67-
| [yoke-derive](https://github.com/unicode-org/icu4x) | 0.7.5 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
62+
| [writeable](https://github.com/unicode-org/icu4x) | 0.6.1 | The ICU4X Project Developers | Unicode-3.0 |
63+
| [yoke](https://github.com/unicode-org/icu4x) | 0.8.0 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
64+
| [yoke-derive](https://github.com/unicode-org/icu4x) | 0.8.0 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
6865
| [zerofrom](https://github.com/unicode-org/icu4x) | 0.1.6 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
6966
| [zerofrom-derive](https://github.com/unicode-org/icu4x) | 0.1.6 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
70-
| [zerovec](https://github.com/unicode-org/icu4x) | 0.10.4 | The ICU4X Project Developers | Unicode-3.0 |
71-
| [zerovec-derive](https://github.com/unicode-org/icu4x) | 0.10.3 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
67+
| [zerotrie](https://github.com/unicode-org/icu4x) | 0.2.2 | The ICU4X Project Developers | Unicode-3.0 |
68+
| [zerovec](https://github.com/unicode-org/icu4x) | 0.11.2 | The ICU4X Project Developers | Unicode-3.0 |
69+
| [zerovec-derive](https://github.com/unicode-org/icu4x) | 0.11.1 | [Manish Goregaokar](mailto:[email protected]) | Unicode-3.0 |
7270

7371
### Legend
7472

Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-bashman"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2024"
@@ -71,16 +71,17 @@ argyle = "0.12.*"
7171

7272
[dependencies]
7373
argyle = "0.12.*"
74-
adbyss_psl = "0.16.*"
74+
adbyss_psl = "0.17.*"
7575
dactyl = "0.10.*"
76-
fyi_msg = "2.0.*"
76+
fyi_ansi = "2.1.*"
77+
fyi_msg = "2.1.*"
7778
oxford_join = "0.5.*"
7879
trimothy = "0.7.*"
79-
utc2k = "0.12.*"
80+
utc2k = "0.13.*"
8081
write_atomic = "0.6.*"
8182

8283
[dependencies.libdeflater]
83-
version = "=1.23.1"
84+
version = "=1.24.0"
8485
features = [ "freestanding" ]
8586

8687
[dependencies.semver]

build.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ use std::{
88
collections::BTreeSet,
99
ffi::OsStr,
1010
fs::File,
11-
io::{
12-
Error,
13-
ErrorKind,
14-
},
11+
io::Error,
1512
path::PathBuf,
1613
process::{
1714
Command,
@@ -74,11 +71,10 @@ fn build_targets() {
7471
.output()
7572
.and_then(|o|
7673
if o.status.success() {
77-
String::from_utf8(o.stdout)
78-
.map_err(|e| Error::new(ErrorKind::Other, e))
74+
String::from_utf8(o.stdout).map_err(Error::other)
7975
}
8076
else {
81-
Err(Error::new(ErrorKind::Other, String::from_utf8_lossy(&o.stderr)))
77+
Err(Error::other(String::from_utf8_lossy(&o.stderr)))
8278
}
8379
);
8480

@@ -132,7 +128,7 @@ impl TryFrom<String> for TargetTriple {
132128
impl fmt::Display for TargetTriple {
133129
#[inline]
134130
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
135-
f.pad(self.as_str())
131+
<str as fmt::Display>::fmt(self.as_str(), f)
136132
}
137133
}
138134

release/man/cargo-bashman.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.TH "CARGO BASHMAN" "1" "April 2025" "cargo\-bashman v0.7.1" "User Commands"
1+
.TH "CARGO BASHMAN" "1" "May 2025" "cargo\-bashman v0.7.2" "User Commands"
22
.SH NAME
3-
CARGO BASHMAN \- Manual page for cargo\-bashman v0.7.1.
3+
CARGO BASHMAN \- Manual page for cargo\-bashman v0.7.2.
44
.SH DESCRIPTION
55
A Cargo plugin to generate bash completions, man pages, and/or crate credits.
66
.SS USAGE:

src/err.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ use crate::{
66
KeyWord,
77
TargetTriple,
88
};
9+
use fyi_ansi::{
10+
ansi,
11+
csi,
12+
dim,
13+
};
914
use std::fmt;
1015

1116

@@ -20,7 +25,7 @@ const HELP: &str = concat!(r"
2025
|\ \_/||\_/ /|
2126
\ '. \/ .' /
2227
/ ^ `'~ ~'` \
23-
/ _-^_~ -^_ ~- | ", "\x1b[38;5;199mCargo BashMan\x1b[0;38;5;69m v", env!("CARGO_PKG_VERSION"), "\x1b[0m", r"
28+
/ _-^_~ -^_ ~- | ", csi!(199), "Cargo BashMan", ansi!((cornflower_blue) " v", env!("CARGO_PKG_VERSION")), r"
2429
| / ^_ -^_- ~_^\ | A BASH completion script and MAN
2530
| |~_ ^- _-^_ -| | page generator for Rust projects.
2631
| \ ^-~_ ~-_^ / |
@@ -115,7 +120,11 @@ impl fmt::Display for BashManError {
115120
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
116121
let s = match self {
117122
Self::Bash => "Unable to generate bash completions.",
118-
Self::Cargo => "Unable to execute \x1b[2mcargo metadata\x1b[0m.",
123+
Self::Cargo => concat!(
124+
"Unable to execute ",
125+
dim!("cargo metadata"),
126+
".",
127+
),
119128
Self::Credits => "Unable to generate crate credits.",
120129
Self::Dir(k, v) => return write!(f, "Invalid {k} directory: {v}"),
121130
Self::DuplicateKeyWord(k) => return write!(

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ use bash::BashWriter;
6969
use credits::CreditsWriter;
7070
use dactyl::NiceElapsed;
7171
use err::BashManError;
72+
use fyi_ansi::dim;
7273
use fyi_msg::Msg;
7374
use man::ManWriter;
7475
use oxford_join::{
@@ -138,7 +139,7 @@ fn main() -> ExitCode {
138139
},
139140
Err(BashManError::Target) => {
140141
Msg::error("Target must be one of the following:").eprint();
141-
eprintln!("\x1b[2m-----\x1b[0m");
142+
eprintln!(dim!("-----"));
142143
println!("{}", BashManError::Target);
143144
ExitCode::FAILURE
144145
}
@@ -254,7 +255,7 @@ fn main__() -> Result<(), BashManError> {
254255
if ! good.is_empty() {
255256
files.sort_unstable();
256257
Msg::success(format!(
257-
"Generated {} in {}.\n \x1b[2m{}\x1b[0m",
258+
concat!("Generated {} in {}.\n ", dim!("{}")),
258259
OxfordJoinFmt::and(good.as_slice()),
259260
NiceElapsed::from(now),
260261
JoinFmt::new(

src/parse/keyword.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ impl<'de> de::Deserialize<'de> for KeyWord {
3434

3535
impl fmt::Display for KeyWord {
3636
#[inline]
37-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.pad(self.as_str()) }
37+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
38+
<str as fmt::Display>::fmt(self.as_str(), f)
39+
}
3840
}
3941

4042
impl TryFrom<&str> for KeyWord {
@@ -97,7 +99,7 @@ impl KeyWord {
9799
}
98100

99101
/// # As String Slice.
100-
pub(crate) fn as_str(&self) -> &str {
102+
pub(crate) const fn as_str(&self) -> &str {
101103
match self { Self::Command(s) | Self::Key(s) => s.as_str() }
102104
}
103105
}

0 commit comments

Comments
 (0)