// Function to get the next available Tip ID
Function to get the next available Tip ID
Function to get the next available Tip ID
pub fn next_id() -> Option<usize> {
        let tips: Tips = Tips::load();
        let num_tips = tips.tips.len();
        let last_tip = match tips.tips.get(num_tips - 1) {
            Some(tip) => tip,
            None => {
                panic!("Error unable to get next id from tips vector")
            },
        };
        Some(last_tip.metadata.id.unwrap() + 1)
    }
pub fn next_id ( ) -> Option < usize > { let tips : Tips = Tips :: load ( ) ; let num_tips = tips . tips . len ( ) ; let last_tip = match tips . tips . get ( num_tips - 1 ) { Some ( tip ) => tip , None => { panic ! ( " " ) } , } ; Some ( last_tip . metadata . id . unwrap ( ) + 1 ) }
Function to get the next available Tip ID
Function to get the next available Tip ID