Remove unused imports, and deprecated function usage (#18663)
* clean up imports and slice to remove delete * revert buggy code * Replace "delete" with setlen to remove depreciation warning
This commit is contained in:
parent
8ce782d463
commit
31fc0f9718
4 changed files with 4 additions and 5 deletions
|
|
@ -835,7 +835,7 @@ proc docstringSummary(rstText: string): string =
|
||||||
result = rstText.substr(2).strip
|
result = rstText.substr(2).strip
|
||||||
var pos = result.find('\L')
|
var pos = result.find('\L')
|
||||||
if pos > 0:
|
if pos > 0:
|
||||||
result.delete(pos, result.len - 1)
|
result.setLen(pos - 1)
|
||||||
result.add("…")
|
result.add("…")
|
||||||
if pos < maxDocstringChars:
|
if pos < maxDocstringChars:
|
||||||
return
|
return
|
||||||
|
|
@ -843,7 +843,7 @@ proc docstringSummary(rstText: string): string =
|
||||||
pos = result.find({'.', ',', ':'})
|
pos = result.find({'.', ',', ':'})
|
||||||
let last = result.len - 1
|
let last = result.len - 1
|
||||||
if pos > 0 and pos < last:
|
if pos > 0 and pos < last:
|
||||||
result.delete(pos, last)
|
result.setLen(pos - 1)
|
||||||
result.add("…")
|
result.add("…")
|
||||||
|
|
||||||
proc genDeprecationMsg(d: PDoc, n: PNode): string =
|
proc genDeprecationMsg(d: PDoc, n: PNode): string =
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ implements the required case distinction.
|
||||||
|
|
||||||
|
|
||||||
import
|
import
|
||||||
ast, astalgo, trees, magicsys, options,
|
ast, trees, magicsys, options,
|
||||||
nversion, msgs, idents, types,
|
nversion, msgs, idents, types,
|
||||||
ropes, passes, ccgutils, wordrecg, renderer,
|
ropes, passes, ccgutils, wordrecg, renderer,
|
||||||
cgmeth, lowerings, sighashes, modulegraphs, lineinfos, rodutils,
|
cgmeth, lowerings, sighashes, modulegraphs, lineinfos, rodutils,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
## Simple tool to automate frequent workflows: Can "clone"
|
## Simple tool to automate frequent workflows: Can "clone"
|
||||||
## a Nimble dependency and its dependencies recursively.
|
## a Nimble dependency and its dependencies recursively.
|
||||||
|
|
||||||
import std/[parseopt, strutils, os, osproc, sequtils, unicode, tables, sets]
|
import std/[parseopt, strutils, os, osproc, unicode, tables, sets]
|
||||||
import parse_requires, osutils, packagesjson
|
import parse_requires, osutils, packagesjson
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
import std / [json, os, sets, strutils]
|
import std / [json, os, sets, strutils]
|
||||||
import osutils
|
|
||||||
|
|
||||||
type
|
type
|
||||||
Package* = ref object
|
Package* = ref object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue