1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-11-06 08:39:09 +02:00

add comment about safe cast

This commit is contained in:
Владимир Фетисов
2019-10-07 22:45:40 +03:00
parent 08c6ddbbca
commit 56d1216f78

View File

@@ -30,6 +30,8 @@ func (resp *HTTPResponse) Compare(other core.Value) int64 {
return Compare(HTTPResponseType, other.Type()) return Compare(HTTPResponseType, other.Type())
} }
// it's a safe cast because HTTPResponse doesn't implement
// core.Value.
otherResp := other.(*HTTPResponse) otherResp := other.(*HTTPResponse)
comp := resp.Headers.Compare(otherResp.Headers) comp := resp.Headers.Compare(otherResp.Headers)