Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release 0.5.0 #56

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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