Skip to content

Commit

Permalink
Prepare release 0.5.0
Browse files Browse the repository at this point in the history
Includes minor style fixes found by clippy nightly and bump of edition.
  • Loading branch information
grembo authored Dec 30, 2023
2 parents 80882b6 + fe60c5d commit c0a3eb6
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 43 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.5.0] 2023-12-30
### Changed
- Adopt anyhow and thiserror instead of failure
- Start a modularization work to build a pot crate
- Make DNS configuration optional (#51)

## [0.4.4] 2020-03-31
### Fixed
Expand Down
59 changes: 25 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "potnet"
version = "0.4.4"
version = "0.5.0"
authors = ["Luca Pizzamiglio <[email protected]>"]
edition = "2018"
edition = "2021"
categories = ["command-line-interface"]
keywords = ["FreeBSD"]
repository = "https://github.com/pizzamig/potnet"
Expand Down
2 changes: 1 addition & 1 deletion pot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pot-rs"
version = "0.5.0"
authors = ["Luca Pizzamiglio <[email protected]>"]
edition = "2018"
edition = "2021"
keywords = ["FreeBSD"]
description = "Utility modules and functions useful to interact with the pot framework"
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions pot/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl PartialSystemConf {
Err(_) => return dconf,
};
let pconf = PartialSystemConf::from_str(&s).ok().unwrap_or_default();
let pconf_has_dns_ip = pconf.dns_ip != None;
let pconf_has_dns_ip = pconf.dns_ip.is_some();
dconf.merge(pconf);
// remove dns_ip if it came from default config and is not inside pot network
if !pconf_has_dns_ip {
Expand Down Expand Up @@ -234,7 +234,7 @@ mod tests {
assert!(uut.is_ok());
let uut = uut.unwrap();
assert!(!uut.is_valid());
assert!(!uut.network.is_some());
assert!(uut.network.is_none());
}

#[test]
Expand Down
4 changes: 1 addition & 3 deletions src/bin/potcpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ fn allocation_from_utf8(v: &[u8]) -> Result<Allocation> {
let result: Allocation = mask
.split(',')
.map(str::trim)
.map(str::parse)
.filter(std::result::Result::is_ok)
.map(std::result::Result::unwrap)
.flat_map(str::parse)
.collect();
Ok(result)
}
Expand Down

0 comments on commit c0a3eb6

Please sign in to comment.