Skip to content

Commit 1eabb0b

Browse files
committed
bump thiserror to v2
1 parent ce6b905 commit 1eabb0b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ futures-channel = "0.3.30"
1515
futures-util = "0.3.30"
1616
pin-project-lite = "0.2.13"
1717
scoped-tls = "1.0"
18-
thiserror = "1.0"
18+
thiserror = "2.0"
1919
web-sys = { version = "0.3.66", features = [
2020
"DomException",
2121
"DomStringList",

src/database.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,24 @@ impl<'a, Err> ObjectStoreBuilder<'a, Err> {
128128
/// If you want to use a compound primary key made of multiple attributes, please see [`ObjectStoreBuilder::compound_key_path`].
129129
///
130130
/// Internally, this [sets this setting](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore#keypath).
131-
pub fn key_path(mut self, path: &str) -> Self {
132-
self.options.key_path(Some(&JsString::from(path)));
131+
pub fn key_path(self, path: &str) -> Self {
132+
self.options.set_key_path(&JsString::from(path));
133133
self
134134
}
135135

136136
/// Set the key path for out-of-line keys
137137
///
138138
/// Internally, this [sets this setting](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore#keypath).
139-
pub fn compound_key_path(mut self, paths: &[&str]) -> Self {
140-
self.options.key_path(Some(&str_slice_to_array(paths)));
139+
pub fn compound_key_path(self, paths: &[&str]) -> Self {
140+
self.options.set_key_path(&str_slice_to_array(paths));
141141
self
142142
}
143143

144144
/// Enable auto-increment for the key
145145
///
146146
/// Internally, this [sets this setting](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore#autoincrement).
147-
pub fn auto_increment(mut self) -> Self {
148-
self.options.auto_increment(true);
147+
pub fn auto_increment(self) -> Self {
148+
self.options.set_auto_increment(true);
149149
self
150150
}
151151
}

src/object_store.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,16 @@ impl<'a, Err> IndexBuilder<'a, Err> {
445445
/// Mark this index as unique
446446
///
447447
/// Internally, this sets [this property](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex#unique).
448-
pub fn unique(mut self) -> Self {
449-
self.options.unique(true);
448+
pub fn unique(self) -> Self {
449+
self.options.set_unique(true);
450450
self
451451
}
452452

453453
/// Mark this index as multi-entry
454454
///
455455
/// Internally, this sets [this property](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex#multientry).
456-
pub fn multi_entry(mut self) -> Self {
457-
self.options.multi_entry(true);
456+
pub fn multi_entry(self) -> Self {
457+
self.options.set_multi_entry(true);
458458
self
459459
}
460460
}

0 commit comments

Comments
 (0)