Rename x T to x: T for fields and func args

This commit is contained in:
Nigel Tao committed 2019-10-12 21:49:04 +11:00
1 parent 5b4e3647c0
commit 1520a1f345
15 files changed
+226 -216

No files matched your search

+14 -14
View File
@@ -27,29 +27,29 @@ pub status "#incorrect dictionary"
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 1
pub struct decoder?(
bad_call_sequence base.bool,
header_complete base.bool,
bad_call_sequence : base.bool,
header_complete : base.bool,
got_dictionary base.bool,
want_dictionary base.bool,
got_dictionary : base.bool,
want_dictionary : base.bool,
ignore_checksum base.bool,
checksum adler32.hasher,
ignore_checksum : base.bool,
checksum : adler32.hasher,
dict_id_hasher adler32.hasher,
dict_id_got base.u32,
dict_id_want base.u32,
dict_id_hasher : adler32.hasher,
dict_id_got : base.u32,
dict_id_want : base.u32,
flate deflate.decoder,
flate : deflate.decoder,
util base.utility,
util : base.utility,
)
pub func decoder.dictionary_id() base.u32 {
return this.dict_id_want
}
pub func decoder.add_dictionary!(dict slice base.u8) {
pub func decoder.add_dictionary!(dict: slice base.u8) {
if this.header_complete {
this.bad_call_sequence = true
} else {
@@ -59,7 +59,7 @@ pub func decoder.add_dictionary!(dict slice base.u8) {
this.got_dictionary = true
}
pub func decoder.set_ignore_checksum!(ic base.bool) {
pub func decoder.set_ignore_checksum!(ic: base.bool) {
this.ignore_checksum = args.ic
}
@@ -69,7 +69,7 @@ pub func decoder.workbuf_len() base.range_ii_u64 {
max_incl: decoder_workbuf_len_max_incl_worst_case)
}
pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workbuf slice base.u8) {
pub func decoder.decode_io_writer?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
var x base.u16
var checksum_got base.u32
var status base.status