Repository navigation
Update Rust crate systemd to 0.11 - #173
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.10→0.11Release Notes
codyps/rust-systemd (systemd)
v0.11.1Compare Source
Fixed
v0.11.0Compare Source
Breaking changes and migration
systemd::Erroris now a crate-owned type instead of a re-export ofstd::io::Error, andsystemd::Resultuses it. It preserves error kinds anderrno while adding operation and argument context.
?converts between thetwo error types; direct
io::Resultassignments or returns need conversion,such as
.map_err(Into::into), or asystemd::Resultsignature. User-definedtrait implementations and callbacks using
systemd::Resultmust use the newerror type. Converting native errors back to
io::Errorpreserves errno anddrops added context;
into_io_error_with_context()retains context instead.send,print,log,log_record, andsd_journal_log!now returnResult<()>. Handle errors with?or explicitly, rather than checking integerreturn codes or assuming an infallible call. These are the primary function
names; no separate
try_*variants are needed.Ok(())does not guaranteemessage delivery. The
log::Logadapter remains best effort.leave the process environment unchanged. Remove that argument from
listen_fds,notify,pid_notify,pid_notify_with_fds, andwatchdog_enabled. Use their explicit unsafe*_unset_environmentvariantsonly when all concurrent environment access can be prevented.
ObjectPath,BusName,InterfaceName, andMemberNamefrom_bytesconstructors return
Resultinstead ofOption. Propagate or handle theirvalidation errors. String-taking APIs use
systemd::CStrArgument, replacingthe
cstr-argumentdependency; custom argument implementations must implementthe crate's fallible trait.
RawError::from_rawrequiresunsafe. The safe conversion from an unvalidated native error has been removed.busfeature requires systemd 239. Newer APIs require the cumulative
systemd_v240,systemd_v241,systemd_v245, orsystemd_v254features. In particular,boot-specific application IDs and bus method-call timeout methods require
systemd_v240. Disable unsupported features for older or partial backends.Some(pid), orNone. BothNoneand
0select the current process. Add a type annotation to ambiguousDefault::default()or.into()arguments, or passNone/Some(pid)directly.Added
Cow, with validation errors and allocation avoidance for suitable inputs.ObjectPathBuf,BusNameBuf,InterfaceNameBuf, andMemberNameBuftypes.with owned callback storage and native slot cleanup.
Bus::open,open_user,open_system,open_system_remote, andopen_system_machine, plus explicit flush and close.JournalLog::with_formatterfor custom message text with structured metadata,global installation, and a fallible configured logger's
log_recordmethod.listen_fds_with_namesand itsexplicit unsafe environment-clearing variant. Names retain non-UTF-8 bytes and
duplicate matches; dropping the names does not close descriptors.
field queries.
user_primary_session, and process/session aliases.Existing C-backed
get_*names remain supported. Session start-time queriesrequire
systemd_v254.Fixed
propagate while optional record source locations remain supported.
EOVERFLOW;Noneremains theway to request an infinite wait.
after file-change notifications. Missing cutoff timestamps return
None.absent message errors. Native error copying and allocation fallbacks retain
valid owned storage and correct string lengths.
including manual linking, libelogind, static libraries, and cross compilation.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.