@@ -86,7 +86,7 @@ macro_rules! flags_api {
8686/// Control the behavior of table simplification.
8787///
8888/// Inclusion of values sets an option to `true`.
89- /// The default behavior (`NONE`) is to perform the algorithm
89+ /// The default behavior is to perform the algorithm
9090/// as described in Kelleher *et al.* (2018), 10.1371/journal.pcbi.1006581.
9191///
9292/// The documentation for each field is taken from the `tskit` primary
@@ -101,7 +101,6 @@ macro_rules! flags_api {
101101/// ```
102102/// # use tskit::SimplificationOptions;
103103/// let flags = SimplificationOptions::default();
104- /// assert_eq!(flags, SimplificationOptions::NONE);
105104/// ```
106105///
107106/// ### Using a "builder" API
@@ -119,8 +118,6 @@ macro_rules! flags_api {
119118pub struct SimplificationOptions ( RawFlags ) ;
120119
121120impl SimplificationOptions {
122- /// Default behavior
123- pub const NONE : Self = Self ( 0 ) ;
124121 make_constant_self ! ( => FILTER_SITES , TSK_SIMPLIFY_FILTER_SITES ) ;
125122 make_constant_self ! (
126123 /// If True, remove any populations that are not referenced by
@@ -248,7 +245,6 @@ impl SimplificationOptions {
248245/// ```
249246/// # use tskit::TableClearOptions;
250247/// let f = TableClearOptions::default();
251- /// assert_eq!(f, TableClearOptions::NONE);
252248/// ```
253249///
254250/// ## Builder API
@@ -285,8 +281,6 @@ impl SimplificationOptions {
285281pub struct TableClearOptions ( RawFlags ) ;
286282
287283impl TableClearOptions {
288- /// Default behavior.
289- pub const NONE : Self = Self ( 0 ) ;
290284 make_constant_self ! ( => CLEAR_METADATA_SCHEMAS , TSK_CLEAR_METADATA_SCHEMAS ) ;
291285 make_constant_self ! ( => CLEAR_TS_METADATA_SCHEMA , TSK_CLEAR_TS_METADATA_AND_SCHEMA ) ;
292286 make_constant_self ! ( => CLEAR_PROVENANCE , TSK_CLEAR_PROVENANCE ) ;
@@ -313,7 +307,6 @@ impl TableClearOptions {
313307/// ```
314308/// # use tskit::TableEqualityOptions;
315309/// let f = TableEqualityOptions::default();
316- /// assert_eq!(f, TableEqualityOptions::NONE);
317310/// ```
318311///
319312/// ## Builder API
@@ -358,8 +351,6 @@ impl TableClearOptions {
358351pub struct TableEqualityOptions ( RawFlags ) ;
359352
360353impl TableEqualityOptions {
361- /// Default behavior.
362- pub const NONE : Self = Self ( 0 ) ;
363354 make_constant_self ! ( => IGNORE_METADATA , TSK_CMP_IGNORE_METADATA ) ;
364355 make_constant_self ! ( =>IGNORE_TS_METADATA , TSK_CMP_IGNORE_TS_METADATA ) ;
365356 make_constant_self ! ( => IGNORE_PROVENANCE , TSK_CMP_IGNORE_PROVENANCE ) ;
@@ -390,7 +381,6 @@ impl TableEqualityOptions {
390381/// ```
391382/// # use tskit::TableSortOptions;
392383/// let f = TableSortOptions::default();
393- /// assert_eq!(f, TableSortOptions::NONE);
394384/// ```
395385///
396386/// ## Builder API
@@ -407,8 +397,6 @@ impl TableEqualityOptions {
407397pub struct TableSortOptions ( RawFlags ) ;
408398
409399impl TableSortOptions {
410- /// Default behavior.
411- pub const NONE : Self = Self ( 0 ) ;
412400 make_constant_self ! (
413401 /// Do not validate contents of edge table.
414402 => NO_CHECK_INTEGRITY , TSK_NO_CHECK_INTEGRITY ) ;
@@ -429,15 +417,12 @@ impl TableSortOptions {
429417/// ```
430418/// # use tskit::IndividualTableSortOptions;
431419/// let f = IndividualTableSortOptions::default();
432- /// assert_eq!(f, IndividualTableSortOptions::NONE);
433420/// ```
434421#[ derive( Default , Debug , Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
435422#[ repr( transparent) ]
436423pub struct IndividualTableSortOptions ( RawFlags ) ;
437424
438425impl IndividualTableSortOptions {
439- /// Default behavior.
440- pub const NONE : Self = Self ( 0 ) ;
441426 bits ! ( ) ;
442427 all ! ( ) ;
443428 contains ! ( ) ;
@@ -453,7 +438,6 @@ impl IndividualTableSortOptions {
453438/// ```
454439/// # use tskit::TreeFlags;
455440/// let f = TreeFlags::default();
456- /// assert_eq!(f, TreeFlags::NONE);
457441/// ```
458442///
459443/// ## Builder API
@@ -476,8 +460,6 @@ impl IndividualTableSortOptions {
476460pub struct TreeFlags ( RawFlags ) ;
477461
478462impl TreeFlags {
479- /// Default behavior.
480- pub const NONE : Self = Self ( 0 ) ;
481463 make_constant_self ! (
482464 /// Update sample lists, enabling [`Tree::samples`].
483465 => SAMPLE_LISTS , TSK_SAMPLE_LISTS ) ;
@@ -537,7 +519,6 @@ impl TableOutputOptions {
537519/// ```
538520/// # use tskit::TreeSequenceFlags;
539521/// let f = TreeSequenceFlags::default();
540- /// assert_eq!(f, TreeSequenceFlags::NONE);
541522/// ```
542523///
543524/// ## Builder API
@@ -555,8 +536,6 @@ impl TableOutputOptions {
555536pub struct TreeSequenceFlags ( RawFlags ) ;
556537
557538impl TreeSequenceFlags {
558- /// Default behavior
559- pub const NONE : Self = Self ( 0 ) ;
560539 make_constant_self ! (
561540 /// If used, then build table indexes if they are not present.
562541 => BUILD_INDEXES , TSK_TS_INIT_BUILD_INDEXES ) ;
@@ -578,7 +557,6 @@ impl TreeSequenceFlags {
578557/// ```
579558/// # use tskit::TableIntegrityCheckFlags;
580559/// let f = TableIntegrityCheckFlags::default();
581- /// assert_eq!(f, TableIntegrityCheckFlags::NONE);
582560/// ```
583561///
584562/// ## Builder API
@@ -637,8 +615,6 @@ impl TreeSequenceFlags {
637615pub struct TableIntegrityCheckFlags ( RawFlags ) ;
638616
639617impl TableIntegrityCheckFlags {
640- /// Default behavior is a set of basic checks
641- pub const NONE : Self = Self ( 0 ) ;
642618 make_constant_self ! (
643619 /// Check that edges are ordered
644620 => CHECK_EDGE_ORDERING , TSK_CHECK_EDGE_ORDERING ) ;
@@ -696,8 +672,6 @@ impl TableIntegrityCheckFlags {
696672pub struct NodeFlags ( tsk_flags_t ) ;
697673
698674impl NodeFlags {
699- /// Default (empty)
700- pub const NONE : Self = Self ( 0 ) ;
701675 make_constant_self ! (
702676 /// Node is a sample
703677 => IS_SAMPLE , TSK_NODE_IS_SAMPLE ) ;
@@ -745,8 +719,6 @@ impl NodeFlags {
745719pub struct IndividualFlags ( RawFlags ) ;
746720
747721impl IndividualFlags {
748- /// Default (empty)
749- pub const NONE : Self = Self ( 0 ) ;
750722 bits ! ( ) ;
751723 all ! ( ) ;
752724 contains ! ( ) ;
@@ -787,10 +759,8 @@ mod tests {
787759 fn default_looks_like_zero ( ) {
788760 let n = NodeFlags :: default ( ) ;
789761 assert_eq ! ( n. bits( ) , 0 ) ;
790- assert ! ( n. contains( NodeFlags :: NONE ) ) ;
791762 let s = SimplificationOptions :: default ( ) ;
792763 assert_eq ! ( s. bits( ) , 0 ) ;
793- assert ! ( s. contains( SimplificationOptions :: NONE ) ) ;
794764 }
795765
796766 #[ test]
0 commit comments