@@ -53,7 +53,7 @@ fn test_write_read() {
53
53
}
54
54
assert_eq ! ( ids_and_data. len( ) as u64 , db. document_count( ) ) ;
55
55
for ( doc_id, foo) in & ids_and_data {
56
- let doc = db. get_existsing ( doc_id) . unwrap ( ) ;
56
+ let doc = db. get_existing ( doc_id) . unwrap ( ) ;
57
57
let loaded_foo: Foo = doc. decode_data ( ) . unwrap ( ) ;
58
58
assert_eq ! ( * foo, loaded_foo) ;
59
59
}
@@ -63,15 +63,15 @@ fn test_write_read() {
63
63
let mut db = Database :: open ( & db_path, DatabaseConfig :: default ( ) ) . unwrap ( ) ;
64
64
assert_eq ! ( ids_and_data. len( ) as u64 , db. document_count( ) ) ;
65
65
for ( doc_id, foo) in & ids_and_data {
66
- let doc = db. get_existsing ( doc_id) . unwrap ( ) ;
66
+ let doc = db. get_existing ( doc_id) . unwrap ( ) ;
67
67
let loaded_foo: Foo = doc. decode_data ( ) . unwrap ( ) ;
68
68
assert_eq ! ( * foo, loaded_foo) ;
69
69
}
70
70
71
71
{
72
72
let mut trans = db. transaction ( ) . unwrap ( ) ;
73
73
for ( doc_id, foo) in & ids_and_data {
74
- let mut doc = trans. get_existsing ( doc_id) . unwrap ( ) ;
74
+ let mut doc = trans. get_existing ( doc_id) . unwrap ( ) ;
75
75
let mut foo_updated = foo. clone ( ) ;
76
76
foo_updated. i += 1 ;
77
77
doc. update_data ( & foo_updated) . unwrap ( ) ;
@@ -81,7 +81,7 @@ fn test_write_read() {
81
81
}
82
82
assert_eq ! ( ids_and_data. len( ) as u64 , db. document_count( ) ) ;
83
83
for ( doc_id, foo) in & ids_and_data {
84
- let doc = db. get_existsing ( doc_id) . unwrap ( ) ;
84
+ let doc = db. get_existing ( doc_id) . unwrap ( ) ;
85
85
let loaded_foo: Foo = doc. decode_data ( ) . unwrap ( ) ;
86
86
assert_eq ! (
87
87
Foo {
@@ -123,7 +123,7 @@ fn test_write_read() {
123
123
{
124
124
let mut trans = db. transaction ( ) . unwrap ( ) ;
125
125
for doc_id in ids_and_data. iter ( ) . take ( n) . map ( |x| x. 0 . as_str ( ) ) {
126
- let mut doc = trans. get_existsing ( doc_id) . unwrap ( ) ;
126
+ let mut doc = trans. get_existing ( doc_id) . unwrap ( ) ;
127
127
trans. delete ( & mut doc) . unwrap ( ) ;
128
128
}
129
129
trans. commit ( ) . unwrap ( ) ;
@@ -170,7 +170,7 @@ fn test_observed_changes() {
170
170
171
171
{
172
172
let mut trans = db. transaction ( ) . unwrap ( ) ;
173
- let mut doc = trans. get_existsing ( & doc_id) . unwrap ( ) ;
173
+ let mut doc = trans. get_existing ( & doc_id) . unwrap ( ) ;
174
174
trans. delete ( & mut doc) . unwrap ( ) ;
175
175
trans. commit ( ) . unwrap ( ) ;
176
176
}
@@ -182,7 +182,7 @@ fn test_observed_changes() {
182
182
assert ! ( !changes[ 0 ] . external( ) ) ;
183
183
assert_eq ! ( 2 , changes[ 0 ] . body_size( ) ) ;
184
184
185
- let doc = db. get_existsing ( & doc_id) . unwrap ( ) ;
185
+ let doc = db. get_existing ( & doc_id) . unwrap ( ) ;
186
186
println ! ( "doc {:?}" , doc) ;
187
187
doc. decode_data :: < Empty > ( ) . unwrap ( ) ;
188
188
}
@@ -208,7 +208,7 @@ fn test_save_float() {
208
208
let doc_id: String = doc. id ( ) . into ( ) ;
209
209
drop ( doc) ;
210
210
211
- let doc = db. get_existsing ( & doc_id) . unwrap ( ) ;
211
+ let doc = db. get_existing ( & doc_id) . unwrap ( ) ;
212
212
let loaded_s: S = doc. decode_data ( ) . unwrap ( ) ;
213
213
assert_eq ! ( s, loaded_s) ;
214
214
}
@@ -238,7 +238,7 @@ fn test_save_several_times() {
238
238
drop ( doc) ;
239
239
assert_eq ! ( 1 , db. document_count( ) ) ;
240
240
241
- let doc = db. get_existsing ( & doc_id) . unwrap ( ) ;
241
+ let doc = db. get_existing ( & doc_id) . unwrap ( ) ;
242
242
assert_eq ! ( s, doc. decode_data:: <S >( ) . unwrap( ) ) ;
243
243
244
244
let s = create_s ( 501 ) ;
@@ -249,7 +249,7 @@ fn test_save_several_times() {
249
249
drop ( doc) ;
250
250
assert_eq ! ( 1 , db. document_count( ) ) ;
251
251
252
- let doc = db. get_existsing ( & doc_id) . unwrap ( ) ;
252
+ let doc = db. get_existing ( & doc_id) . unwrap ( ) ;
253
253
assert_eq ! ( s, doc. decode_data:: <S >( ) . unwrap( ) ) ;
254
254
255
255
let s = create_s ( 400 ) ;
@@ -261,7 +261,7 @@ fn test_save_several_times() {
261
261
drop ( doc) ;
262
262
assert_eq ! ( 1 , db. document_count( ) ) ;
263
263
264
- let doc = db. get_existsing ( & doc_id) . unwrap ( ) ;
264
+ let doc = db. get_existing ( & doc_id) . unwrap ( ) ;
265
265
assert_eq ! ( s, doc. decode_data:: <S >( ) . unwrap( ) ) ;
266
266
}
267
267
tmp_dir. close ( ) . expect ( "Can not close tmp_dir" ) ;
@@ -324,7 +324,7 @@ fn test_indices() {
324
324
let id = item. get_raw_checked ( 0 ) . unwrap ( ) ;
325
325
let id = id. as_str ( ) . unwrap ( ) ;
326
326
println ! ( "iteration id {}" , id) ;
327
- let doc = db. get_existsing ( id) . unwrap ( ) ;
327
+ let doc = db. get_existing ( id) . unwrap ( ) ;
328
328
println ! ( "doc id {}" , doc. id( ) ) ;
329
329
330
330
let foo: Foo = doc. decode_data ( ) . unwrap ( ) ;
0 commit comments