node: simplify some substr->slice expressions
This commit is contained in:
parent
23e06f517c
commit
c29a4894ce
4
node.go
4
node.go
@ -1254,6 +1254,10 @@ func (this *conversionState) convertNoFreeFloating(n_ node.Node) (string, error)
|
||||
} else if len(callParams) == 3 {
|
||||
// if lnum, ok := n.ArgumentList.Arguments[1].
|
||||
|
||||
if callParams[1] == `0` {
|
||||
return "(" + callParams[0] + ")[:" + callParams[2] + "]", nil
|
||||
}
|
||||
|
||||
// WARNING: We are doubling up on the first parameter
|
||||
// This is a problem if it's not necessarily constant
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user