@@ -290,7 +290,7 @@ impl IndividualTable {
290290 /// # assert!(tables.add_individual_with_metadata(0, None, None,
291291 /// # &metadata).is_ok());
292292 /// // We know the metadata are here, so we unwrap the Option and the Result:
293- /// let decoded = tables.individuals().metadata::<IndividualMetadata>(0.into() ).unwrap().unwrap();
293+ /// let decoded = tables.individuals().metadata::<IndividualMetadata>(0).unwrap().unwrap();
294294 /// assert_eq!(decoded.x, 1);
295295 /// # }
296296 /// ```
@@ -313,7 +313,7 @@ impl IndividualTable {
313313 /// # assert!(tables
314314 /// # .add_individual_with_metadata(0, None, None, &metadata)
315315 /// # .is_ok());
316- /// match tables.individuals().metadata::<IndividualMetadata>(0.into() )
316+ /// match tables.individuals().metadata::<IndividualMetadata>(0)
317317 /// {
318318 /// Some(Ok(metadata)) => assert_eq!(metadata.x, 1),
319319 /// Some(Err(_)) => panic!("got an error??"),
@@ -350,7 +350,7 @@ impl IndividualTable {
350350# }
351351#
352352# let mut tables = tskit::TableCollection::new(10.).unwrap();
353- match tables.individuals().metadata::<MutationMetadata>(0.into() )
353+ match tables.individuals().metadata::<MutationMetadata>(0)
354354{
355355 Some(Ok(metadata)) => assert_eq!(metadata.x, 1),
356356 Some(Err(_)) => panic!("got an error??"),
@@ -398,7 +398,7 @@ match tables.individuals().metadata::<MutationMetadata>(0.into())
398398 /// // Add a row with our metadata
399399 /// assert!(tables.add_individual_with_metadata(0, None, None, &metadata).is_ok());
400400 /// // Trying to fetch using our SECOND type as the generic type works!
401- /// match tables.individuals().metadata::<IndividualMetadataToo>(0.into() )
401+ /// match tables.individuals().metadata::<IndividualMetadataToo>(0)
402402 /// {
403403 /// Some(Ok(metadata)) => assert_eq!(metadata.x, 1),
404404 /// Some(Err(_)) => panic!("got an error??"),
@@ -420,7 +420,7 @@ match tables.individuals().metadata::<MutationMetadata>(0.into())
420420 /// metadata type for a table.
421421 pub fn metadata < T : metadata:: IndividualMetadata > (
422422 & self ,
423- row : IndividualId ,
423+ row : impl Into < IndividualId > ,
424424 ) -> Option < Result < T , TskitError > > {
425425 let buffer = self . raw_metadata ( row) ?;
426426 Some ( decode_metadata_row ! ( T , buffer) . map_err ( |e| e. into ( ) ) )
0 commit comments