@@ -242,18 +242,18 @@ fn import_graph_handles_cycles() -> Result<()> {
242242 let cfg = default_config ( & dir) ;
243243 let mut env = OntoEnv :: init ( cfg, false ) ?;
244244 env. add (
245- OntologyLocation :: File ( a_path) ,
245+ OntologyLocation :: File ( a_path. clone ( ) ) ,
246246 Overwrite :: Allow ,
247247 RefreshStrategy :: UseCache ,
248248 ) ?;
249249 env. add (
250- OntologyLocation :: File ( b_path) ,
250+ OntologyLocation :: File ( b_path. clone ( ) ) ,
251251 Overwrite :: Allow ,
252252 RefreshStrategy :: UseCache ,
253253 ) ?;
254254
255255 let a_id = env
256- . resolve ( ResolveTarget :: Location ( OntologyLocation :: from_str ( & a_iri ) ? ) )
256+ . resolve ( ResolveTarget :: Location ( OntologyLocation :: File ( a_path ) ) )
257257 . unwrap ( ) ;
258258 let merged = env. import_graph ( & a_id, -1 ) ?;
259259
@@ -336,23 +336,23 @@ fn import_graph_respects_recursion_depth() -> Result<()> {
336336 let cfg = default_config ( & dir) ;
337337 let mut env = OntoEnv :: init ( cfg, false ) ?;
338338 env. add (
339- OntologyLocation :: File ( a_path) ,
339+ OntologyLocation :: File ( a_path. clone ( ) ) ,
340340 Overwrite :: Allow ,
341341 RefreshStrategy :: UseCache ,
342342 ) ?;
343343 env. add (
344- OntologyLocation :: File ( b_path) ,
344+ OntologyLocation :: File ( b_path. clone ( ) ) ,
345345 Overwrite :: Allow ,
346346 RefreshStrategy :: UseCache ,
347347 ) ?;
348348 env. add (
349- OntologyLocation :: File ( c_path) ,
349+ OntologyLocation :: File ( c_path. clone ( ) ) ,
350350 Overwrite :: Allow ,
351351 RefreshStrategy :: UseCache ,
352352 ) ?;
353353
354354 let a_id = env
355- . resolve ( ResolveTarget :: Location ( OntologyLocation :: from_str ( & a_iri ) ? ) )
355+ . resolve ( ResolveTarget :: Location ( OntologyLocation :: File ( a_path ) ) )
356356 . unwrap ( ) ;
357357
358358 // depth 0: only A (no imports attached)
0 commit comments