More refactors around assets. Trust me, we need them
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
//! Module for string interning. A string can be converted to a stable integer
|
||||
//! constant, called an *atom*. The value of an for a given string is guaranteed
|
||||
//! to be stable throughout a program's runtime, but not across different runs.
|
||||
//! There can be no more than 2¹⁶ atoms.
|
||||
//! constant, called an *atom*. The value of an atom for a given string is
|
||||
//! guaranteed to be stable throughout a program's runtime, but not across
|
||||
//! different runs. There can be no more than 2¹⁶ atoms.
|
||||
//!
|
||||
//! Use this module for converting string IDs into numbers, so that they can be
|
||||
//! Use this module to convert string IDs into numbers, so that they can be
|
||||
//! compared more easily. The users of this module should import it with
|
||||
//! `@import("Atom.zig").Atom` and use the methods available in the `Atom` type.
|
||||
|
||||
@@ -76,7 +76,7 @@ pub const Atom = enum(u16) {
|
||||
}
|
||||
|
||||
/// Cast an atom into an integer.
|
||||
pub fn toInt(self: Atom) u32 {
|
||||
pub fn toInt(self: Atom) u16 {
|
||||
return @intFromEnum(self);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user