1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

refactor(core): derive equality traits for ResolutionKind enum (#17578)

The commit derives Eq, PartialEq, and Debug traits for the
`ResolutionKind` enum to make it possible for external
implementors to assert ResolutionKind.
This commit is contained in:
Satya Rohith 2023-01-29 16:09:43 +04:00 committed by GitHub
parent 50ba8ae6b2
commit 2c78550144
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,6 +204,7 @@ pub type ModuleSourceFuture = dyn Future<Output = Result<ModuleSource, Error>>;
type ModuleLoadFuture = type ModuleLoadFuture =
dyn Future<Output = Result<(ModuleRequest, ModuleSource), Error>>; dyn Future<Output = Result<(ModuleRequest, ModuleSource), Error>>;
#[derive(Debug, PartialEq, Eq)]
pub enum ResolutionKind { pub enum ResolutionKind {
/// This kind is used in only one situation: when a module is loaded via /// This kind is used in only one situation: when a module is loaded via
/// `JsRuntime::load_main_module` and is the top-level module, ie. the one /// `JsRuntime::load_main_module` and is the top-level module, ie. the one