mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
missed some renamings
This commit is contained in:
parent
a98d2540ae
commit
8404f7f06e
4 changed files with 6 additions and 6 deletions
|
|
@ -49,7 +49,7 @@ pub fn fileSourceHtml(
|
|||
var cursor: usize = ast.tokenStart(start_token);
|
||||
|
||||
var indent: usize = 0;
|
||||
if (std.mem.lastIndexOf(u8, ast.source[0..cursor], "\n")) |newline_index| {
|
||||
if (std.mem.findLast(u8, ast.source[0..cursor], "\n")) |newline_index| {
|
||||
for (ast.source[newline_index + 1 .. cursor]) |c| {
|
||||
if (c == ' ') {
|
||||
indent += 1;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ fn mainImpl() !void {
|
|||
var stdin_reader = std.fs.File.stdin().reader(&stdin_buffer);
|
||||
|
||||
while (stdin_reader.takeDelimiterExclusive('\n')) |line| {
|
||||
const trimmed = std.mem.trimRight(u8, line, '\r');
|
||||
const trimmed = std.mem.trimEnd(u8, line, '\r');
|
||||
try parser.feedLine(trimmed);
|
||||
} else |err| switch (err) {
|
||||
error.EndOfStream => {},
|
||||
|
|
|
|||
|
|
@ -1197,7 +1197,7 @@ fn windowsCreateProcessPathExt(
|
|||
|
||||
const is_bat_or_cmd = bat_or_cmd: {
|
||||
const app_name = app_buf.items[0..app_name_len];
|
||||
const ext_start = std.mem.lastIndexOfScalar(u16, app_name, '.') orelse break :bat_or_cmd false;
|
||||
const ext_start = std.mem.findScalarLast(u16, app_name, '.') orelse break :bat_or_cmd false;
|
||||
const ext = app_name[ext_start..];
|
||||
const ext_enum = windowsCreateProcessSupportsExtension(ext) orelse break :bat_or_cmd false;
|
||||
switch (ext_enum) {
|
||||
|
|
@ -1225,7 +1225,7 @@ fn windowsCreateProcessPathExt(
|
|||
// it's treated as an unrecoverable error. Otherwise, it'll be
|
||||
// skipped as normal.
|
||||
const app_name = app_buf.items[0..app_name_len];
|
||||
const ext_start = std.mem.lastIndexOfScalar(u16, app_name, '.') orelse break :unappended err;
|
||||
const ext_start = std.mem.findScalarLast(u16, app_name, '.') orelse break :unappended err;
|
||||
const ext = app_name[ext_start..];
|
||||
if (windows.eqlIgnoreCaseWtf16(ext, unicode.utf8ToUtf16LeStringLiteral(".EXE"))) {
|
||||
return error.UnrecoverableInvalidExe;
|
||||
|
|
|
|||
|
|
@ -202,8 +202,8 @@ fn fetchTarget(
|
|||
|
||||
var it = mem.splitScalar(u8, headers_list_str, '\n');
|
||||
while (it.next()) |line| {
|
||||
if (mem.lastIndexOf(u8, line, "clang") != null) continue;
|
||||
if (mem.lastIndexOf(u8, line, prefix[0..])) |idx| {
|
||||
if (mem.findLast(u8, line, "clang") != null) continue;
|
||||
if (mem.findLast(u8, line, prefix[0..])) |idx| {
|
||||
const out_rel_path = line[idx + prefix.len + 1 ..];
|
||||
const out_rel_path_stripped = mem.trim(u8, out_rel_path, " \\");
|
||||
const dirname = fs.path.dirname(out_rel_path_stripped) orelse ".";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue