mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 13:15:50 +00:00
Git dependencies, skip dropping ServeSession
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use std::{
|
||||
io::{BufWriter, Write},
|
||||
mem::ManuallyDrop,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
@@ -61,6 +62,14 @@ impl BuildCommand {
|
||||
}
|
||||
}
|
||||
|
||||
// Never drop ServeSession, because it's VERY expensive to drop and
|
||||
// we're about to exit anyways.
|
||||
//
|
||||
// This is kind of evil; if this function is ever called outside of the
|
||||
// context of a CLI, this will leak a large object forever. However, the
|
||||
// performance benefits of leaking it outweigh the cost at this time.
|
||||
let _session = ManuallyDrop::new(session);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user