Skip to content

Commit 126603c

Browse files
bors[bot]burrbull
andauthored
Merge #678
678: release 0.27.0 r=Emilgardis a=burrbull Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2 parents 16390bc + f684bde commit 126603c

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.27.0] - 2022-10-24
11+
1012
- Manually inline set/clear_bit
1113
- Don't cast fields with width 17-31
1214
- Make `generic.rs` generic
13-
- Change initial write value for registers with modifiedWriteValues
15+
- [breaking-change] Change initial write value for registers with modifiedWriteValues
1416
- Update `clap` to 4.0, use `irx-config` instead of `clap_conf`
1517
- Add #[must_use] to prevent hanging field writers
1618
- Remove explicit deref in `generic.rs` since it's done by auto-deref
17-
- Make writing raw bits to a whole register safe if the SVD indicates
19+
- [breaking-change] Make writing raw bits to a whole register safe if the SVD indicates
1820
so through the <WriteConstraint> element (see [v0.7.1] too).
1921
- Remove lint #![deny(const_err)] as it is a hard error in Rust now
2022
- Add doc of using `critical-section`
@@ -759,7 +761,8 @@ peripheral.register.write(|w| w.field().set());
759761

760762
- Initial version of the `svd2rust` tool
761763

762-
[Unreleased]: https://github.com/rust-embedded/svd2rust/compare/v0.26.0...HEAD
764+
[Unreleased]: https://github.com/rust-embedded/svd2rust/compare/v0.27.0...HEAD
765+
[v0.27.0]: https://github.com/rust-embedded/svd2rust/compare/v0.26.0...v0.27.0
763766
[v0.26.0]: https://github.com/rust-embedded/svd2rust/compare/v0.25.1...v0.26.0
764767
[v0.25.1]: https://github.com/rust-embedded/svd2rust/compare/v0.25.0...v0.25.1
765768
[v0.25.0]: https://github.com/rust-embedded/svd2rust/compare/v0.24.1...v0.25.0

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ keywords = [
2323
license = "MIT OR Apache-2.0"
2424
name = "svd2rust"
2525
repository = "https://github.com/rust-embedded/svd2rust/"
26-
version = "0.26.0"
26+
version = "0.27.0"
2727
readme = "README.md"
2828
rust-version = "1.60"
2929

@@ -58,11 +58,11 @@ serde_yaml = { version = "0.9.11", optional = true }
5858

5959
[dependencies.svd-parser]
6060
features = ["expand"]
61-
version = "0.14.0"
61+
version = "0.14.1"
6262

6363
[dependencies.svd-rs]
6464
features = ["serde"]
65-
version = "0.14.0"
65+
version = "0.14.1"
6666

6767
[dependencies.syn]
6868
version = "1.0"

src/generate/peripheral.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ fn cluster_block(
10091009
let name_constant_case = mod_name.to_constant_case_ident(span);
10101010

10111011
if let Some(dpath) = dpath {
1012-
let dparent = util::parent(&dpath).unwrap();
1012+
let dparent = dpath.parent().unwrap();
10131013
let mut derived = if &dparent == path {
10141014
type_path(Punctuated::new())
10151015
} else {

src/util.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use proc_macro2::{Ident, Span, TokenStream};
66
use quote::quote;
77
use std::collections::HashSet;
88
use std::path::{Path, PathBuf};
9-
use svd_parser::expand::BlockPath;
109
use svd_rs::{MaybeArray, Peripheral, PeripheralInfo};
1110

1211
use syn::{
@@ -457,12 +456,6 @@ pub fn path_segment(ident: Ident) -> PathSegment {
457456
}
458457
}
459458

460-
pub fn parent(p: &BlockPath) -> Option<BlockPath> {
461-
let mut p = p.clone();
462-
p.path.pop()?;
463-
Some(p)
464-
}
465-
466459
pub trait U32Ext {
467460
fn size_to_str(&self) -> Result<&str>;
468461
fn to_ty(&self) -> Result<Ident>;

0 commit comments

Comments
 (0)