Skip to content

Commit 64d7eee

Browse files
abap34aviatesk
andcommitted
maximize type stability
Co-Authored-By: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
1 parent 0215ee9 commit 64d7eee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/config.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Retrieves the current configuration value.
173173
Among the registered configuration files, fetches the value in order of priority (see `Base.lt(::ConfigFileOrder, path1, path2)`).
174174
If the key path does not exist in any of the configurations, returns `nothing`.
175175
"""
176-
function get_config(manager::ConfigManager, key_path::Symbol...)
176+
Base.@constprop :aggressive function get_config(manager::ConfigManager, key_path::Symbol...)
177177
try
178178
is_static_setting(key_path...) &&
179179
return getobjpath(load(manager).static_settings, key_path...)

src/utils/general.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ may be unset (set to `nothing`) depending on client/server capabilities.
118118
Traverses the field chain `paths...` of `obj`, and returns `nothing` if any
119119
`nothing` field is encountered along the way.
120120
"""
121-
function getobjpath(obj, path::Symbol, paths::Symbol...)
121+
@noinline Base.@constprop :aggressive function getobjpath(obj, path::Symbol, paths::Symbol...)
122122
nextobj = @something getfield(obj, path) return nothing
123123
getobjpath(nextobj, paths...)
124124
end

0 commit comments

Comments
 (0)