Mutating methods change the receiver variable, not every value copied from it.

Mutate one value

mutating_copy.swift
struct Counter {
    var value: Int

    mutating func advance(by step: Int) {
        value += step
    }
}

let step = 
let original = Counter(value: 10)
var copy = original
copy.advance(by: step)
let message = "original=\(original.value), copy=\(copy.value)"

print(message)
struct Counter {
    var value: Int

    mutating func advance(by step: Int) {
        value += step
    }
}

let step = 
let original = Counter(value: 10)
var copy = original
copy.advance(by: step)
let message = "original=\(original.value), copy=\(copy.value)"

print(message)
struct Counter {
    var value: Int

    mutating func advance(by step: Int) {
        value += step
    }
}

let step = 
let original = Counter(value: 10)
var copy = original
copy.advance(by: step)
let message = "original=\(original.value), copy=\(copy.value)"

print(message)
mutating copy When a struct value is copied, a mutating method on the copy leaves the original value alone.