structstd.Build.Watch.Match.Context[src]

Functions

Functionhash[src]

pub fn hash(self: Context, a: Match) u32

Parameters

self: Context

Source Code

Source code
pub fn hash(self: Context, a: Match) u32 {
    _ = self;
    var hasher = Hash.init(0);
    std.hash.autoHash(&hasher, a.step);
    hasher.update(a.basename);
    return @truncate(hasher.final());
}

Functioneql[src]

pub fn eql(self: Context, a: Match, b: Match, b_index: usize) bool

Parameters

self: Context
b_index: usize

Source Code

Source code
pub fn eql(self: Context, a: Match, b: Match, b_index: usize) bool {
    _ = self;
    _ = b_index;
    return a.step == b.step and std.mem.eql(u8, a.basename, b.basename);
}

Source Code

Source code
pub const Context = struct {
    pub fn hash(self: Context, a: Match) u32 {
        _ = self;
        var hasher = Hash.init(0);
        std.hash.autoHash(&hasher, a.step);
        hasher.update(a.basename);
        return @truncate(hasher.final());
    }
    pub fn eql(self: Context, a: Match, b: Match, b_index: usize) bool {
        _ = self;
        _ = b_index;
        return a.step == b.step and std.mem.eql(u8, a.basename, b.basename);
    }
}