fixed return value of add_ava_int (#1735)

This commit is contained in:
Sebastiano Tocci 2023-06-14 13:28:43 +02:00 committed by GitHub
parent 3c421c240d
commit 76cee8cecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2138,7 +2138,7 @@ impl Entry<EntryReduced, EntryCommitted> {
// impl<STATE> Entry<EntryValid, STATE> { // impl<STATE> Entry<EntryValid, STATE> {
impl<VALID, STATE> Entry<VALID, STATE> { impl<VALID, STATE> Entry<VALID, STATE> {
/// This internally adds an AVA to the entry. If the entry was newely added, then true is returned. /// This internally adds an AVA to the entry. If the entry was newly added, then true is returned.
/// If the value already existed, or was unable to be added, false is returned. Alternately, /// If the value already existed, or was unable to be added, false is returned. Alternately,
/// you can think of this boolean as "if a write occurred to the structure", true indicating that /// you can think of this boolean as "if a write occurred to the structure", true indicating that
/// a change occurred. /// a change occurred.
@ -2154,7 +2154,7 @@ impl<VALID, STATE> Entry<VALID, STATE> {
.expect("Unable to fail - non-zero iter, and single value type!"); .expect("Unable to fail - non-zero iter, and single value type!");
self.attrs.insert(AttrString::from(attr), vs); self.attrs.insert(AttrString::from(attr), vs);
// The attribute did not exist before. // The attribute did not exist before.
false true
} }
// Doesn't matter if it already exists, equality will replace. // Doesn't matter if it already exists, equality will replace.
} }