@@ -418,7 +418,7 @@ impl Database {
418418 if scope. is_null ( ) {
419419 None
420420 } else {
421- Some ( Scope :: retain ( scope) )
421+ Some ( Scope :: wrap ( scope) )
422422 }
423423 } )
424424 }
@@ -445,7 +445,7 @@ impl Database {
445445 if collection. is_null ( ) {
446446 None
447447 } else {
448- Some ( Collection :: retain ( collection) )
448+ Some ( Collection :: wrap ( collection) )
449449 }
450450 } )
451451 }
@@ -474,7 +474,7 @@ impl Database {
474474 )
475475 } ;
476476
477- check_error ( & error) . map ( |( ) | Collection :: retain ( collection) )
477+ check_error ( & error) . map ( |( ) | Collection :: wrap ( collection) )
478478 }
479479
480480 /// Delete an existing collection.
@@ -499,7 +499,7 @@ impl Database {
499499 let mut error = CBLError :: default ( ) ;
500500 let scope = unsafe { CBLDatabase_DefaultScope ( self . get_ref ( ) , & mut error) } ;
501501
502- check_error ( & error) . map ( |( ) | Scope :: retain ( scope) )
502+ check_error ( & error) . map ( |( ) | Scope :: wrap ( scope) )
503503 }
504504
505505 /// Returns the default collection.
@@ -511,7 +511,7 @@ impl Database {
511511 if collection. is_null ( ) {
512512 None
513513 } else {
514- Some ( Collection :: retain ( collection) )
514+ Some ( Collection :: wrap ( collection) )
515515 }
516516 } )
517517 }
@@ -526,7 +526,7 @@ impl Database {
526526 if collection. is_null ( ) {
527527 Err ( Error :: cbl_error ( CouchbaseLiteError :: NotFound ) )
528528 } else {
529- Ok ( Collection :: retain ( collection) )
529+ Ok ( Collection :: wrap ( collection) )
530530 }
531531 }
532532
0 commit comments