(r: u32)
| 86 | // Convert to cpg.h values |
| 87 | impl Reason { |
| 88 | pub fn new(r: u32) -> Reason { |
| 89 | match r { |
| 90 | 0 => Reason::Undefined, |
| 91 | 1 => Reason::Join, |
| 92 | 2 => Reason::Leave, |
| 93 | 3 => Reason::NodeDown, |
| 94 | 4 => Reason::NodeUp, |
| 95 | 5 => Reason::ProcDown, |
| 96 | _ => Reason::Undefined, |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | impl fmt::Display for Reason { |
| 101 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
nothing calls this directly
no test coverage detected