Skip to content

Commit de4101d

Browse files
committed
release: 0.2.4
2 parents 9278996 + f607060 commit de4101d

File tree

8 files changed

+148
-170
lines changed

8 files changed

+148
-170
lines changed

CREDITS.md

Lines changed: 133 additions & 154 deletions
Large diffs are not rendered by default.

bashman/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-bashman"
3-
version = "0.2.3"
3+
version = "0.2.4"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2018"
@@ -45,11 +45,11 @@ label = "<Cargo.toml>"
4545
path = true
4646

4747
[dependencies]
48-
argyle = "0.3.*"
48+
argyle = "0.4.*"
4949

5050
[dependencies.bashman_core]
5151
path = "../bashman_core"
5252

5353
[dependencies.fyi_msg]
5454
git = "https://github.com/Blobfolio/fyi.git"
55-
tag = "v0.7.0"
55+
tag = "v0.7.1"

bashman/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE

bashman_core/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bashman_core"
3-
version = "0.2.3"
3+
version = "0.2.4"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2018"
@@ -9,7 +9,7 @@ repository = "https://github.com/Blobfolio/bashman"
99
publish = false
1010

1111
[dependencies]
12-
argyle = "0.3.*"
12+
argyle = "0.4.*"
1313
indexmap = "1.6.*"
1414
libdeflater = "0.7.*"
1515

@@ -20,7 +20,7 @@ features = [ "clock", "std" ]
2020

2121
[dependencies.fyi_msg]
2222
git = "https://github.com/Blobfolio/fyi.git"
23-
tag = "v0.7.0"
23+
tag = "v0.7.1"
2424

2525
[dependencies.serde]
2626
version = "1.0.*"

bashman_core/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE

bashman_core/src/data.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use libdeflater::{
1313
};
1414
use std::{
1515
ffi::OsStr,
16+
fs::File,
1617
io::Write,
1718
os::unix::ffi::OsStrExt,
1819
path::Path,
@@ -136,7 +137,7 @@ impl<'a> Command<'a> {
136137
// Write it to a file!
137138
let mut out_file = path.to_path_buf();
138139
out_file.push(self.bin.to_string() + ".bash");
139-
std::fs::File::create(&out_file)
140+
File::create(&out_file)
140141
.and_then(|mut f| f.write_all(buf).and_then(|_| f.flush()))
141142
.map_err(|_| BashManError::WriteBash)?;
142143

@@ -335,11 +336,10 @@ impl<'a> Command<'a> {
335336
Ok(())
336337
}
337338

338-
#[allow(trivial_casts)]
339339
/// # Write For Real.
340340
fn _write_man(&self, path: &Path, data: &[u8]) -> Result<(), BashManError> {
341341
// Write plain.
342-
std::fs::File::create(&path)
342+
File::create(&path)
343343
.and_then(|mut f| f.write_all(data).and_then(|_| f.flush()))
344344
.map_err(|_| BashManError::WriteSubMan(Box::from(self.bin)))?;
345345

@@ -353,10 +353,7 @@ impl<'a> Command<'a> {
353353
buf.truncate(len);
354354

355355
// Toss ".gz" onto the original file path and write again!
356-
std::fs::File::create(OsStr::from_bytes(&[
357-
unsafe { &*(path.as_os_str() as *const OsStr as *const [u8]) },
358-
b".gz",
359-
].concat()))
356+
File::create(OsStr::from_bytes(&[path.as_os_str().as_bytes(), b".gz"].concat()))
360357
.and_then(|mut f| f.write_all(&buf).and_then(|_| f.flush()))
361358
.map_err(|_| BashManError::WriteSubMan(Box::from(self.bin)))
362359
}

bashman_core/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub enum BashManError {
4141
impl fmt::Display for BashManError {
4242
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4343
match self {
44-
Self::Argue(src) => f.write_str(src.as_ref()),
44+
Self::Argue(src) => f.write_str(src.as_str()),
4545
Self::InvalidBashDir => f.write_str("Invalid BASH output directory."),
4646
Self::InvalidFlag => f.write_str("Flags require at least one short/long key."),
4747
Self::InvalidItem => f.write_str("Items require a key and value."),

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" "March 2021" "Cargo BashMan v0.2.3" "User Commands"
1+
.TH "CARGO BASHMAN" "1" "April 2021" "Cargo BashMan v0.2.4" "User Commands"
22
.SH NAME
3-
Cargo BashMan \- Manual page for cargo\-bashman v0.2.3.
3+
Cargo BashMan \- Manual page for cargo\-bashman v0.2.4.
44
.SH DESCRIPTION
55
BashMan is a Cargo plugin that helps you generate BASH completions and/or MAN pages for your Rust project.
66
.SS USAGE:

0 commit comments

Comments
 (0)