summaryrefslogtreecommitdiffstats
path: root/vendor/futures-util/src/stream/futures_unordered/abort.rs
blob: 1a42d243698fc26ddff1463d99a01b6f782890ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
pub(super) fn abort(s: &str) -> ! {
    struct DoublePanic;

    impl Drop for DoublePanic {
        fn drop(&mut self) {
            panic!("panicking twice to abort the program");
        }
    }

    let _bomb = DoublePanic;
    panic!("{}", s);
}