mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 21:48:36 +03:00
Use cached values
Summary: Instead of calling out the Rust functions all the time, just use the public global variables initialised lazily. Differential Revision: D38241744 fbshipit-source-id: dd66e8d563076fed9279358a2b22c2042d365cc9
This commit is contained in:
parent
7d14b4cf42
commit
c448e50fee
@ -52,20 +52,20 @@ pub extern "C" fn fb_get_env() -> u8 {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fb_is_prod() -> bool {
|
||||
is_prod()
|
||||
*IN_PROD
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fb_is_corp() -> bool {
|
||||
is_corp()
|
||||
*IN_CORP
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fb_is_lab() -> bool {
|
||||
is_lab()
|
||||
*IN_LAB
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fb_has_servicerouter() -> bool {
|
||||
is_prod()
|
||||
*IN_PROD
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user