File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -138,8 +138,7 @@ const indentRulesMap = std.StaticStringMap(IndentRules).initComptime(.{
138
138
// Looks up the indentation rules for the given operator.
139
139
fn lookupIndentRules (line : []const u8 , operator : []const u8 ) IndentRules {
140
140
var rules = indentRulesMap .get (operator ) orelse return .{};
141
- // TODO(https://github.com/ziglang/zig/issues/1738): @intFromPtr should be unnecessary.
142
- const column = @intFromPtr (operator .ptr ) - @intFromPtr (line .ptr );
141
+ const column = operator .ptr - line .ptr ;
143
142
// We only recognize wrapper forms occurring at the top level (column 1,
144
143
// meaning the open paren is on column 0).
145
144
if (column != 1 ) rules .wrapper = false ;
@@ -196,8 +195,7 @@ const ImportBlock = enum {
196
195
197
196
// Looks up the new import block given the current one and an operator.
198
197
fn lookupImportBlock (current : ImportBlock , line : []const u8 , operator : []const u8 ) ImportBlock {
199
- // TODO(https://github.com/ziglang/zig/issues/1738): @intFromPtr should be unnecessary.
200
- const column = @intFromPtr (operator .ptr ) - @intFromPtr (line .ptr );
198
+ const column = operator .ptr - line .ptr ;
201
199
switch (current ) {
202
200
.none = > if (column == 1 ) {
203
201
if (std .mem .eql (u8 , operator , "Chapter" ) or
You can’t perform that action at this time.
0 commit comments