generated from PlexSheep/baserepo
some fixes for hedu #64
|
@ -16,8 +16,8 @@ authors = ["Christoph J. Scherr <software@cscherr.de>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "Personal multitool"
|
description = "Personal multitool"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
homepage = "https://git.cscherr.de/PlexSheep/libpt"
|
homepage = "https://git.cscherr.de/PlexSheep/pt"
|
||||||
repository = "https://git.cscherr.de/PlexSheep/libpt"
|
repository = "https://git.cscherr.de/PlexSheep/pt"
|
||||||
keywords = ["cli", "library"]
|
keywords = ["cli", "library"]
|
||||||
categories = [
|
categories = [
|
||||||
"command-line-utilities",
|
"command-line-utilities",
|
||||||
|
|
|
@ -69,6 +69,7 @@ pub fn dump(data: &mut dyn DataSource, mut config: HeduConfig) -> Result<()> {
|
||||||
if config.skip > 0 {
|
if config.skip > 0 {
|
||||||
data.skip(config.skip)?;
|
data.skip(config.skip)?;
|
||||||
config.data_idx += config.skip;
|
config.data_idx += config.skip;
|
||||||
|
adjust_data_idx(&mut config);
|
||||||
debug!("Skipped {}", humanbytes(config.skip));
|
debug!("Skipped {}", humanbytes(config.skip));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +158,11 @@ fn mask_chars(c: char) -> char {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn adjust_data_idx(config: &mut HeduConfig) {
|
||||||
|
config.data_idx += BYTES_PER_LINE - config.data_idx % BYTES_PER_LINE;
|
||||||
|
}
|
||||||
|
|
||||||
fn rd_data(data: &mut dyn DataSource, config: &mut HeduConfig) -> Result<()> {
|
fn rd_data(data: &mut dyn DataSource, config: &mut HeduConfig) -> Result<()> {
|
||||||
match data.read(&mut config.buf[config.alt_buf]) {
|
match data.read(&mut config.buf[config.alt_buf]) {
|
||||||
Ok(mut len) => {
|
Ok(mut len) => {
|
||||||
|
@ -177,6 +183,7 @@ fn rd_data(data: &mut dyn DataSource, config: &mut HeduConfig) -> Result<()> {
|
||||||
config.len = len;
|
config.len = len;
|
||||||
config.rd_counter += config.len;
|
config.rd_counter += config.len;
|
||||||
config.data_idx += config.len;
|
config.data_idx += config.len;
|
||||||
|
adjust_data_idx(config);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
|
@ -6,5 +6,5 @@ NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1')
|
||||||
bash scripts/set_all_versions.sh $NEW_VERSION
|
bash scripts/set_all_versions.sh $NEW_VERSION
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Release v$NEW_VERSION"
|
git commit -m "Release v$NEW_VERSION"
|
||||||
cargo ws publish --registry cscherr --amend --publish-as-is || cargo publish --registry cscherr -p libpt
|
cargo ws publish --registry cscherr --no-git-push --publish-as-is || cargo publish --registry cscherr -p libpt
|
||||||
git push
|
git push
|
||||||
|
|
Reference in New Issue