1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib: remove older deprecated functions (#8864)

This commit is contained in:
Stanislav Ershov
2021-02-20 23:42:55 +05:00
committed by GitHub
parent 30ed201600
commit c190b6a131
4 changed files with 6 additions and 88 deletions

View File

@ -13,12 +13,6 @@ struct FileInfo {
size int
}
[deprecated]
pub fn (f File) is_opened() bool {
eprintln('warning: `File.is_opened()` has been deprecated, use `File.is_opened` instead')
return f.is_opened
}
// **************************** Write ops ***************************
// write implements the Writer interface
pub fn (mut f File) write(buf []byte) ?int {
@ -178,22 +172,6 @@ pub fn open_stdin() File {
}
}
// File.get_line - get a single line from the file. NB: the ending newline is *included*.
[deprecated]
pub fn (mut f File) get_line() ?string {
eprintln('File.get_line() is deprecated... Use a BufferedReader instead')
if !f.is_opened {
return error('file is closed')
}
return error('use io.new_buffered_reader')
/*
mut reader := io.new_buffered_reader({
reader: io.make_reader(f)
})
return reader.read_line()
*/
}
pub fn (mut f File) write_str(s string) ? {
if !f.is_opened {
return error('file is closed')