Skip to content

Commit c0a3eb6

Browse files
authored
Prepare release 0.5.0
Includes minor style fixes found by clippy nightly and bump of edition.
2 parents 80882b6 + fe60c5d commit c0a3eb6

File tree

6 files changed

+33
-43
lines changed

6 files changed

+33
-43
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

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

1213
## [0.4.4] 2020-03-31
1314
### Fixed

Cargo.lock

+25-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "potnet"
3-
version = "0.4.4"
3+
version = "0.5.0"
44
authors = ["Luca Pizzamiglio <[email protected]>"]
5-
edition = "2018"
5+
edition = "2021"
66
categories = ["command-line-interface"]
77
keywords = ["FreeBSD"]
88
repository = "https://github.com/pizzamig/potnet"

pot/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "pot-rs"
33
version = "0.5.0"
44
authors = ["Luca Pizzamiglio <[email protected]>"]
5-
edition = "2018"
5+
edition = "2021"
66
keywords = ["FreeBSD"]
77
description = "Utility modules and functions useful to interact with the pot framework"
88
readme = "README.md"

pot/src/system.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl PartialSystemConf {
3232
Err(_) => return dconf,
3333
};
3434
let pconf = PartialSystemConf::from_str(&s).ok().unwrap_or_default();
35-
let pconf_has_dns_ip = pconf.dns_ip != None;
35+
let pconf_has_dns_ip = pconf.dns_ip.is_some();
3636
dconf.merge(pconf);
3737
// remove dns_ip if it came from default config and is not inside pot network
3838
if !pconf_has_dns_ip {
@@ -234,7 +234,7 @@ mod tests {
234234
assert!(uut.is_ok());
235235
let uut = uut.unwrap();
236236
assert!(!uut.is_valid());
237-
assert!(!uut.network.is_some());
237+
assert!(uut.network.is_none());
238238
}
239239

240240
#[test]

src/bin/potcpu.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ fn allocation_from_utf8(v: &[u8]) -> Result<Allocation> {
5656
let result: Allocation = mask
5757
.split(',')
5858
.map(str::trim)
59-
.map(str::parse)
60-
.filter(std::result::Result::is_ok)
61-
.map(std::result::Result::unwrap)
59+
.flat_map(str::parse)
6260
.collect();
6361
Ok(result)
6462
}

0 commit comments

Comments
 (0)