experiments of a tiny cytube-like player with yt-dlp
0

Configure Feed

Select the types of activity you want to include in your feed.

fmt: collapse multi-line assert! macros in tests

karitham (Jun 1, 2026, 4:06 PM +0200) ff912f76 84295c2f

+16 -26
+15 -25
src/state.rs
··· 1497 1497 // And the active track (track 1) shouldn't be affected by this. 1498 1498 assert_eq!(s.active.as_ref().unwrap().title, "Real"); 1499 1499 // Sanity: the persist effect should carry the resolved track. 1500 - assert!( 1501 - effects 1502 - .iter() 1503 - .any(|e| matches!(e, Effect::PersistQueuedTrack(q) if q.title == "Real")) 1504 - ); 1500 + assert!(effects 1501 + .iter() 1502 + .any(|e| matches!(e, Effect::PersistQueuedTrack(q) if q.title == "Real"))); 1505 1503 } 1506 1504 1507 1505 #[test] ··· 1568 1566 let effects = s.transition(&Event::PlaylistEntryAdded(e.clone()), 0); 1569 1567 assert_eq!(s.playlist.len(), 1); 1570 1568 assert!(s.autoplay_enabled); 1571 - assert!( 1572 - effects 1573 - .iter() 1574 - .any(|e| matches!(e, Effect::AddPlaylistEntry { .. })) 1575 - ); 1569 + assert!(effects 1570 + .iter() 1571 + .any(|e| matches!(e, Effect::AddPlaylistEntry { .. }))); 1576 1572 assert!(effects.iter().any(|e| matches!(e, Effect::PublishSnapshot))); 1577 1573 } 1578 1574 ··· 1613 1609 assert_eq!(s.playlist.len(), 2); 1614 1610 // Cursor should be clamped to last valid index (1). 1615 1611 assert_eq!(s.playlist_cursor, 1); 1616 - assert!( 1617 - effects 1618 - .iter() 1619 - .any(|e| matches!(e, Effect::RemovePlaylistEntry(_))) 1620 - ); 1612 + assert!(effects 1613 + .iter() 1614 + .any(|e| matches!(e, Effect::RemovePlaylistEntry(_)))); 1621 1615 } 1622 1616 1623 1617 #[test] ··· 2183 2177 // Title preserved — the entry was already resolved. 2184 2178 assert_eq!(s.playlist[0].title, original_title); 2185 2179 // No metadata effect needed (no pending entries to flip). 2186 - assert!( 2187 - !effects 2188 - .iter() 2189 - .any(|e| matches!(e, Effect::PersistMetadata { .. })) 2190 - ); 2180 + assert!(!effects 2181 + .iter() 2182 + .any(|e| matches!(e, Effect::PersistMetadata { .. }))); 2191 2183 assert!(!effects.iter().any(|e| matches!(e, Effect::PublishSnapshot))); 2192 2184 } 2193 2185 ··· 2474 2466 "removed track must not remain in queue", 2475 2467 ); 2476 2468 assert!(effects.iter().any(|e| matches!(e, Effect::PublishSnapshot))); 2477 - assert!( 2478 - effects 2479 - .iter() 2480 - .any(|e| matches!(e, Effect::RemoveQueuedTrack { .. })) 2481 - ); 2469 + assert!(effects 2470 + .iter() 2471 + .any(|e| matches!(e, Effect::RemoveQueuedTrack { .. }))); 2482 2472 } else { 2483 2473 assert!(effects.is_empty(), "no-op remove must return no effects"); 2484 2474 }
+1 -1
src/store.rs
··· 114 114 /// Retrieve the most recent chat messages for a room, newest first. 115 115 #[allow(dead_code)] 116 116 async fn recent_chat(&self, room_id: &str, limit: i64) 117 - -> Result<Vec<ChatMessage>, sqlx::Error>; 117 + -> Result<Vec<ChatMessage>, sqlx::Error>; 118 118 119 119 /// Delete a room and all its associated data (CASCADE). 120 120 #[allow(dead_code)]